TestFindLocalCheatpathNotFound tests that empty string is returned when no .cheat exists
(t *testing.T)
| 118 | |
| 119 | // TestFindLocalCheatpathNotFound tests that empty string is returned when no .cheat exists |
| 120 | func TestFindLocalCheatpathNotFound(t *testing.T) { |
| 121 | tempDir, err := os.MkdirTemp("", "cheat-test-*") |
| 122 | if err != nil { |
| 123 | t.Fatalf("failed to create temp dir: %v", err) |
| 124 | } |
| 125 | defer os.RemoveAll(tempDir) |
| 126 | |
| 127 | result := findLocalCheatpath(tempDir) |
| 128 | if result != "" { |
| 129 | t.Errorf("expected empty string, got %s", result) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // TestFindLocalCheatpathSkipsFile tests that a file named .cheat is not matched |
| 134 | func TestFindLocalCheatpathSkipsFile(t *testing.T) { |
nothing calls this directly
no test coverage detected