Test for error when file doesn't exist
(t *testing.T)
| 66 | |
| 67 | // Test for error when file doesn't exist |
| 68 | func TestOpenCamliIncludeNoFile(t *testing.T) { |
| 69 | // Test that error occurs if no such file |
| 70 | const notExist = "this_config_doesnt_exist.config" |
| 71 | |
| 72 | t.Setenv("CAMLI_CONFIG_DIR", filepath.Join(os.TempDir(), "/x/y/z/not-exist")) |
| 73 | |
| 74 | _, e := findCamliInclude(notExist) |
| 75 | if e == nil { |
| 76 | t.Errorf("Successfully opened config which doesn't exist: %v", notExist) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // Test for when a file exists in CWD |
| 81 | func TestOpenCamliIncludeCWD(t *testing.T) { |
nothing calls this directly
no test coverage detected