(t *testing.T)
| 538 | } |
| 539 | |
| 540 | func TestFirstHasNoOutputWhenNIs0(t *testing.T) { |
| 541 | t.Parallel() |
| 542 | input := "a\nb\nc\n" |
| 543 | want := "" |
| 544 | got, err := script.Echo(input).First(0).String() |
| 545 | if err != nil { |
| 546 | t.Fatal(err) |
| 547 | } |
| 548 | if want != got { |
| 549 | t.Error(cmp.Diff(want, got)) |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | func TestFirstHasNoOutputWhenNIsNegative(t *testing.T) { |
| 554 | t.Parallel() |