gotest.tools/gotestsum@v1.11.0/cmd/tool/slowest/slowest_test.go (about) 1 package slowest 2 3 import ( 4 "bytes" 5 "testing" 6 7 "gotest.tools/v3/env" 8 "gotest.tools/v3/golden" 9 ) 10 11 func TestUsage_WithFlagsFromSetupFlags(t *testing.T) { 12 env.PatchAll(t, nil) 13 14 name := "gotestsum tool slowest" 15 flags, _ := setupFlags(name) 16 buf := new(bytes.Buffer) 17 usage(buf, name, flags) 18 19 golden.Assert(t, buf.String(), "cmd-flags-help-text") 20 }