MCPcopy
hub / github.com/perkeep/perkeep / TestOpenCamliIncludeCWD

Function TestOpenCamliIncludeCWD

internal/osutil/paths_test.go:81–92  ·  view source on GitHub ↗

Test for when a file exists in CWD

(t *testing.T)

Source from the content-addressed store, hash-verified

79
80// Test for when a file exists in CWD
81func TestOpenCamliIncludeCWD(t *testing.T) {
82 const path string = "TestOpenCamliIncludeCWD.config"
83 if e := createTestInclude(path); e != nil {
84 t.Errorf("Couldn't create test config file, aborting test: %v", e)
85 return
86 }
87 defer os.Remove(path)
88
89 // Setting CAMLI_CONFIG_DIR just to avoid triggering failInTests in CamliConfigDir
90 t.Setenv("CAMLI_CONFIG_DIR", "whatever") // Restore after test
91 checkOpen(t, path)
92}
93
94// Test for when a file exists in CAMLI_CONFIG_DIR
95func TestOpenCamliIncludeDir(t *testing.T) {

Callers

nothing calls this directly

Calls 3

createTestIncludeFunction · 0.85
checkOpenFunction · 0.85
RemoveMethod · 0.65

Tested by

no test coverage detected