MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / TestExists

Function TestExists

internal/pathutil/pathutil_test.go:66–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func TestExists(t *testing.T) {
67 t.Parallel()
68 dir := t.TempDir()
69 if pathutil.Exists("") {
70 t.Fatal("Exists(\"\") should be false")
71 }
72 if pathutil.Exists(filepath.Join(dir, "missing")) {
73 t.Fatal("Exists on missing path should be false")
74 }
75
76 file := filepath.Join(dir, "file")
77 if err := os.WriteFile(file, []byte("hi"), 0o600); err != nil {
78 t.Fatal(err)
79 }
80 if !pathutil.Exists(file) {
81 t.Fatal("Exists on real file should be true")
82 }
83}

Callers

nothing calls this directly

Calls 1

ExistsFunction · 0.92

Tested by

no test coverage detected