| 1354 | } |
| 1355 | |
| 1356 | func 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 | |
| 1368 | func TestListFiles_ErrorsOnNonexistentPath(t *testing.T) { |
| 1369 | t.Parallel() |