| 197 | } |
| 198 | |
| 199 | func TestConcatOutputsContentsOfSpecifiedFilesInOrder(t *testing.T) { |
| 200 | t.Parallel() |
| 201 | want := "This is the first line in the file.\nHello, world.\nThis is another line in the file.\nhello world" |
| 202 | got, err := script.Echo("testdata/test.txt\ntestdata/doesntexist.txt\ntestdata/hello.txt").Concat().String() |
| 203 | if err != nil { |
| 204 | t.Fatal(err) |
| 205 | } |
| 206 | if !cmp.Equal(want, got) { |
| 207 | t.Error(cmp.Diff(want, got)) |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | func TestDirname_RemovesFilenameComponentFromInputLines(t *testing.T) { |
| 212 | t.Parallel() |