MCPcopy
hub / github.com/bitfield/script / TestListFiles_OutputsDirectoryContentsGivenDirectoryPath

Function TestListFiles_OutputsDirectoryContentsGivenDirectoryPath

script_test.go:1356–1366  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1354}
1355
1356func TestListFiles_OutputsDirectoryContentsGivenDirectoryPath(t *testing.T) {
1357 t.Parallel()
1358 want := filepath.Clean("testdata/multiple_files/1.txt\ntestdata/multiple_files/2.txt\ntestdata/multiple_files/3.tar.zip\n")
1359 got, err := script.ListFiles("testdata/multiple_files").String()
1360 if err != nil {
1361 t.Fatal(err)
1362 }
1363 if got != want {
1364 t.Errorf("Want %q, got %q", want, got)
1365 }
1366}
1367
1368func TestListFiles_ErrorsOnNonexistentPath(t *testing.T) {
1369 t.Parallel()

Callers

nothing calls this directly

Calls 2

ListFilesFunction · 0.92
StringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…