// flag.FlagSet already fails on undefined flag
flag.FlagSet already fails on undefined flag
// flag . FlagSet already fails on undefined flag
func TestUnknownFlagsStdlib(t *testing.T) {
	loader := LoaderFor(&TestConfig{}, Config{
		SkipDefaults: true,
		SkipFiles:    true,
		SkipEnv:      true,
		FlagPrefix:   "tst",
	})
	flags := []string{
		"-tst.str=str-flag",
		"-tst.unknown=1001",
	}
	flagSet := loader.Flags()
	flagSet.SetOutput(ioutil.Discard)
	if err := flagSet.Parse(flags); err == nil {
		t.Fatal("must not be nil")
	}
}
func TestUnknownFlagsStdlib ( t * testing . T ) { loader := LoaderFor ( & TestConfig { } , Config { SkipDefaults : true , SkipFiles : true , SkipEnv : true , FlagPrefix : " " , } ) flags := [ ] string { " " , " " , } flagSet := loader . Flags ( ) flagSet . SetOutput ( ioutil . Discard ) if err := flagSet . Parse ( flags ) ; err == nil { t . Fatal ( " " ) } }
flag.FlagSet already fails on undefined flag
flag . FlagSet already fails on undefined flag
// just for tests