MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / expectBuffer

Function expectBuffer

cli/cmd/progressbar_test.go:11–19  ·  view source on GitHub ↗
(t *testing.T, buf *strings.Builder, expect string)

Source from the content-addressed store, hash-verified

9)
10
11func expectBuffer(t *testing.T, buf *strings.Builder, expect string) {
12 t.Helper()
13 current := strings.TrimSpace(buf.String())
14 if current != expect {
15 r := strings.NewReplacer("\r", "\\R", "\n", "\\N")
16 current, expect = r.Replace(current), r.Replace(expect)
17 t.Fatalf("Render mismatch\nResult: '%s'\nExpect: '%s'\n", current, expect)
18 }
19}
20
21func TestRegression(t *testing.T) {
22 buf := strings.Builder{}

Callers 2

TestRegressionFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected