MCPcopy
hub / github.com/bitfield/script / TestMatchOutputsNothingGivenEmptyInput

Function TestMatchOutputsNothingGivenEmptyInput

script_test.go:953–962  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

951}
952
953func 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
964func TestMatchRegexp_OutputsOnlyLinesMatchingRegexp(t *testing.T) {
965 t.Parallel()

Callers

nothing calls this directly

Calls 4

NewPipeFunction · 0.92
StringMethod · 0.80
MatchMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…