MCPcopy
hub / github.com/spf13/pflag / TestIgnoreUnknownFlags

Function TestIgnoreUnknownFlags

flag_test.go:650–653  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

648}
649
650func TestIgnoreUnknownFlags(t *testing.T) {
651 ResetForTesting(func() { t.Error("bad parse") })
652 testParseWithUnknownFlags(GetCommandLine(), t, func(f *FlagSet) { f.ParseErrorsAllowlist.UnknownFlags = true })
653}
654
655func TestIgnoreUnknownFlagsBackwardsCompat(t *testing.T) {
656 ResetForTesting(func() { t.Error("bad parse") })

Callers

nothing calls this directly

Calls 4

ResetForTestingFunction · 0.85
GetCommandLineFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected