Lines Matching refs:cmd

211     proc test_invalid_expression {cmd expected_re} {
215 gdb_test $cmd $expected_re
219 gdb_test $cmd "Compilation failed\\."
329 foreach cmd {
336 test_gdb_completion_offers_commands "$cmd "
341 proc test_error_cmd {cmd arg expected_re} {
342 if {$cmd == "tfaas"} {
343 gdb_test_no_output "$cmd$arg"
345 gdb_test "$cmd$arg" $expected_re
350 proc test_error_cmd2 {cmd arg expected_re} {
351 if {$cmd == "tfaas" || $cmd == "faas"} {
352 gdb_test_no_output "$cmd$arg"
354 gdb_test "$cmd$arg" $expected_re
358 test_error_cmd $cmd " -" "Ambiguous option at: -"
359 test_gdb_complete_multiple "$cmd " "-" "" {
368 test_error_cmd $cmd " --" \
370 test_gdb_complete_unique "$cmd --" "$cmd --"
374 test_error_cmd $cmd " -- " \
376 test_gdb_completion_offers_commands "$cmd -- "
380 test_error_cmd2 $cmd " -- -" \
383 "$cmd -- -" \
384 "$cmd -- -"
386 test_error_cmd2 $cmd " -foo" \
388 test_gdb_complete_none "$cmd -foo"
390 test_gdb_completion_offers_commands "$cmd -s "
404 foreach cmd {
409 test_gdb_completion_offers_commands "$cmd "
414 proc test_invalid_cmd {cmd arg expected_re} {
415 if {$cmd != "taas"} {
416 gdb_test "$cmd$arg" $expected_re
418 gdb_test_no_output "$cmd$arg"
422 gdb_test "$cmd -" "Ambiguous option at: -"
424 if {$cmd != "thread apply 1"} {
425 test_gdb_complete_multiple "$cmd " "-" "" {
433 test_gdb_complete_multiple "$cmd " "-" "" {
440 if {$cmd == "thread apply all" || $cmd == "taas"} {
443 } elseif {$cmd == "thread apply 1"} {
447 error "unexpected cmd: $cmd"
451 gdb_test "$cmd --" $errmsg
452 test_gdb_complete_unique "$cmd --" "$cmd --"
456 gdb_test "$cmd -- " $errmsg
457 test_gdb_completion_offers_commands "$cmd -- "
461 test_invalid_cmd "$cmd" " -- -" \
464 "$cmd -- -" \
465 "$cmd -- -"
467 test_invalid_cmd $cmd " -foo" \
469 test_gdb_complete_none "$cmd -foo"
471 test_gdb_completion_offers_commands "$cmd -c "
494 set cmd [make_cmd $variant]
497 gdb_test "$cmd" [expect_none ""]
501 gdb_test "$cmd -" [expect_none "-"]
503 gdb_test "$cmd -" "Ambiguous option at: -"
509 "$cmd " "-" "" $all_options
512 gdb_test "$cmd --" [expect_none ""]
518 "$cmd --"
521 gdb_test "$cmd -- -" [expect_none "-"]
522 res_test_gdb_complete_none "0 -" "$cmd -- -"
527 "$cmd -flag"
531 gdb_test "$cmd -xx" [expect_none "-xx"]
533 gdb_test "$cmd -xx" "Ambiguous option at: -xx"
537 gdb_test "$cmd -flag --" [expect_flag ""]
541 gdb_test "$cmd -FLAG --" \
547 gdb_test "$cmd -FLAG" \
550 gdb_test "$cmd -FLAG" [expect_none "-FLAG"]
554 gdb_test "$cmd -1 --" \
556 gdb_test "$cmd -2 --" \
564 set cmd [make_cmd $variant]
569 "$cmd -flag"
574 "$cmd -flag " "-" "" $all_options
580 gdb_test "$cmd -flag 999" [expect_none "-flag 999"]
582 gdb_test "$cmd -flag 999" [expect_flag "999"]
584 gdb_test "$cmd -flag -- 999" [expect_flag "999"]
588 gdb_test "$cmd -flag xxx 999 --" "Unrecognized option at: xxx 999 --"
589 gdb_test "$cmd -flag o 999 --" "Unrecognized option at: o 999 --"
590 gdb_test "$cmd -flag 1 999 --" "Unrecognized option at: 1 999 --"
593 gdb_test "$cmd -flag -flag -- non flags args" \
597 gdb_test "$cmd -xx1 -xx2 -xx1 -xx2 -xx1 -- non flags args" \
601 gdb_test "$cmd -xx1 -xx2 -a -b -c -xx1 --" \
605 gdb_test "$cmd -xx1 -xx1xx2 -xx1 --" \
615 "$cmd -flag o"
617 gdb_test "$cmd -flag o" [expect_none "-flag o"]
619 res_test_gdb_complete_none "0 o" "$cmd -flag o"
621 gdb_test "$cmd -flag o" [expect_flag "o"]
629 set cmd [make_cmd $variant]
649 "$cmd -bool " "" "" $match_list
651 res_test_gdb_complete_none "0 " "$cmd -bool "
657 "$cmd -bool " "-" "" $all_options
674 "$cmd -bool $value"
679 "$cmd -bool $value" \
680 "$cmd -bool off"
685 "$cmd -bool $value" \
686 "$cmd -bool yes"
691 "$cmd -bool $value" \
692 "$cmd -bool no"
704 "$cmd -bool $value" \
705 "$cmd -bool enable"
718 "$cmd -bool $value" \
719 "$cmd -bool disable"
725 "$cmd -bool xxx"
727 res_test_gdb_complete_none "0 xxx" "$cmd -bool xxx"
741 gdb_test "$cmd -bool $value --" [expect_bool ""]
754 gdb_test "$cmd -bool $value --" [expect_none ""]
758 gdb_test "$cmd -bool 999" [expect_none "-bool 999"]
760 gdb_test "$cmd -bool 999" [expect_bool "999"]
762 gdb_test "$cmd -bool -- 999" [expect_bool "999"]
772 gdb_test "$cmd -bool $arg" [expect_none "-bool $arg"]
774 gdb_test "$cmd -bool $arg" [expect_bool "$arg"]
780 gdb_test "$cmd -bool -1" \
783 gdb_test "$cmd -bool -1" \
786 gdb_test "$cmd -bool -1" [expect_bool "-1"]
791 gdb_test "$cmd -bool -1 999 --" \
793 gdb_test "$cmd -bool xxx 999 --" \
795 gdb_test "$cmd -bool o 999 --" \
803 "$cmd -bool " "o" "" {
808 res_test_gdb_complete_multiple "0 o" "$cmd -bool " "o" "" {
820 set cmd "[make_cmd $variant] -$option"
825 "$cmd " "" "" {
834 "$cmd NU"
839 "$cmd u" \
840 "$cmd unlimited"
843 gdb_test "$cmd 1 -- 999" [expect_integer $option "1" "999"]
844 gdb_test "$cmd unlimited -- 999" \
847 gdb_test "$cmd -1 --" [expect_integer $option "unlimited" ""]
848 gdb_test "$cmd 0 --" [expect_integer $option "0" ""]
850 gdb_test "$cmd -1 --" "integer -1 out of range"
851 gdb_test "$cmd 0 --" [expect_integer $option "unlimited" ""]
853 gdb_test "$cmd xxx --" \
855 gdb_test "$cmd unlimitedx --" \
862 "$cmd 1"
868 "$cmd $value"
877 "$cmd $value"
883 "$cmd -1"
887 "$cmd -1 " "" "-" $all_options
889 res_test_gdb_complete_none "0 " "$cmd -1 "
903 "$cmd 1 " "" "-" $all_options
905 res_test_gdb_complete_none "0 " "$cmd 1 "
913 "$cmd 1 $operand"
915 res_test_gdb_complete_none "0 $operand" "$cmd 1 $operand"
921 res_test_gdb_complete_none "0 $operand" "$cmd 1 $operand"
925 "$cmd 1 $operand"
932 set cmd [make_cmd $variant]
936 "$cmd -enum " "" "" {
947 "$cmd -enum -"
948 gdb_test "$cmd -enum --"\
952 gdb_test "$cmd -enum www --" "Undefined item: \"www\"."
959 set cmd [make_cmd $variant]
963 "$cmd -string "
970 "$cmd -string -"
971 gdb_test "$cmd -string --"\
974 gdb_test "$cmd -string" [expect_none "-string"]
976 gdb_test "$cmd -string"\
995 "$cmd -string ${str}"
996 gdb_test "$cmd -string ${str} --" [expect_string "${str}" ""]
1001 "$cmd -string ${str} " "-" "" $all_options
1009 "$cmd -string ${str} BAR"
1011 res_test_gdb_complete_none "0 BAR" "$cmd -string ${str} BAR"
1013 gdb_test "$cmd -string ${str} BAR --" "Unrecognized option at: BAR --"
1018 foreach_with_prefix cmd {
1023 test-misc $cmd
1024 test-flag $cmd
1025 test-boolean $cmd
1027 test-uinteger $cmd $subcmd
1029 test-enum $cmd
1030 test-string $cmd