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

Function TestConcatOutputsContentsOfSpecifiedFilesInOrder

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

Source from the content-addressed store, hash-verified

197}
198
199func TestConcatOutputsContentsOfSpecifiedFilesInOrder(t *testing.T) {
200 t.Parallel()
201 want := "This is the first line in the file.\nHello, world.\nThis is another line in the file.\nhello world"
202 got, err := script.Echo("testdata/test.txt\ntestdata/doesntexist.txt\ntestdata/hello.txt").Concat().String()
203 if err != nil {
204 t.Fatal(err)
205 }
206 if !cmp.Equal(want, got) {
207 t.Error(cmp.Diff(want, got))
208 }
209}
210
211func TestDirname_RemovesFilenameComponentFromInputLines(t *testing.T) {
212 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
ConcatMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…