MCPcopy Create free account
hub / github.com/anchordotdev/cli / TestCleaner

Function TestCleaner

stacktrace/stacktrace_test.go:11–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestCleaner(t *testing.T) {
12 cleaner := &cleaner{
13 GOPATH: gopath,
14 GOROOT: goroot,
15 HOME: home,
16 PWD: pwd,
17 }
18
19 if want, got := cleanStack, cleaner.clean(originalStack); want != got {
20 diff := udiff.Unified("want", "got", want, got)
21
22 t.Fatalf("cleaned stack does not match.\n\nWant:\n\n%s\n\nGot:\n\n%s\n\nDiff:\n\n%s", want, got, diff)
23 }
24}
25
26var (
27 originalStack = `goroutine 39 [running]:

Callers

nothing calls this directly

Calls 1

cleanMethod · 0.95

Tested by

no test coverage detected