Lines Matching refs:Args
164 args := []string{
176 if err := f.Parse(args); err != nil {
209 if len(f.Args()) != 1 {
210 t.Error("expected one argument, got", len(f.Args()))
211 } else if f.Args()[0] != extra {
212 t.Errorf("expected argument %q got %q", extra, f.Args()[0])
246 t.Fatal("expected 3 args; got ", len(v))
320 oldArgs := os.Args
321 defer func() { os.Args = oldArgs }()
322 os.Args = []string{"cmd", "-before", "subcmd", "-after", "args"}
324 if err := CommandLine.Parse(os.Args[1:]); err != nil {
328 os.Args = Args()
331 args := Args()
333 if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" {
334 t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args)