(t *testing.T)
| 1419 | } |
| 1420 | |
| 1421 | func TestSliceProducesElementsOfSpecifiedSliceOnePerLine(t *testing.T) { |
| 1422 | t.Parallel() |
| 1423 | want := "1\n2\n3\n" |
| 1424 | got, err := script.Slice([]string{"1", "2", "3"}).String() |
| 1425 | if err != nil { |
| 1426 | t.Fatal(err) |
| 1427 | } |
| 1428 | if !cmp.Equal(want, got) { |
| 1429 | t.Error(cmp.Diff(want, got)) |
| 1430 | } |
| 1431 | } |
| 1432 | |
| 1433 | func TestSliceGivenEmptySliceProducesEmptyPipe(t *testing.T) { |
| 1434 | t.Parallel() |