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

Function TestCountLines_CountsCorrectNumberOfLinesInInput

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

Source from the content-addressed store, hash-verified

1535}
1536
1537func TestCountLines_CountsCorrectNumberOfLinesInInput(t *testing.T) {
1538 t.Parallel()
1539 want := 3
1540 got, err := script.Echo("a\nb\nc").CountLines()
1541 if err != nil {
1542 t.Fatal(err)
1543 }
1544 if got != want {
1545 t.Errorf("want %d, got %d", want, got)
1546 }
1547}
1548
1549func TestCountLines_Counts0LinesInEmptyInput(t *testing.T) {
1550 t.Parallel()

Callers

nothing calls this directly

Calls 2

EchoFunction · 0.92
CountLinesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…