(t *testing.T)
| 951 | } |
| 952 | |
| 953 | func TestMatchOutputsNothingGivenEmptyInput(t *testing.T) { |
| 954 | t.Parallel() |
| 955 | got, err := script.NewPipe().Match("anything").String() |
| 956 | if err != nil { |
| 957 | t.Fatal(err) |
| 958 | } |
| 959 | if got != "" { |
| 960 | t.Error("want no output given empty input") |
| 961 | } |
| 962 | } |
| 963 | |
| 964 | func TestMatchRegexp_OutputsOnlyLinesMatchingRegexp(t *testing.T) { |
| 965 | t.Parallel() |