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

Function TestFirstHasNoOutputWhenNIs0

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

Source from the content-addressed store, hash-verified

538}
539
540func 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
553func TestFirstHasNoOutputWhenNIsNegative(t *testing.T) {
554 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
FirstMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…