MCPcopy Index your code
hub / github.com/bitfield/script / TestExecForEach_HandlesLongLines

Function TestExecForEach_HandlesLongLines

script_unix_test.go:14–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestExecForEach_HandlesLongLines(t *testing.T) {
15 t.Parallel()
16 got, err := script.Echo(longLine).ExecForEach(`echo "{{.}}"`).String()
17 if err != nil {
18 t.Fatal(err)
19 }
20 if longLine != got {
21 t.Error(cmp.Diff(longLine, got))
22 }
23}
24
25func TestExecRunsShWithEchoHelloAndGetsOutputHello(t *testing.T) {
26 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
ExecForEachMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…