MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestCheckFileIsExist_ExistingFile

Function TestCheckFileIsExist_ExistingFile

pkg/utils/file_test.go:79–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestCheckFileIsExist_ExistingFile(t *testing.T) {
80 tmpDir := t.TempDir()
81 path := filepath.Join(tmpDir, "exists.txt")
82 err := os.WriteFile(path, []byte("data"), 0644)
83 assert.NoError(t, err)
84
85 assert.True(t, CheckFileIsExist(path))
86}
87
88func TestCheckFileIsExist_NonExistingFile(t *testing.T) {
89 assert.False(t, CheckFileIsExist("/nonexistent/file/that/does/not/exist.txt"))

Callers

nothing calls this directly

Calls 1

CheckFileIsExistFunction · 0.85

Tested by

no test coverage detected