2010-06-01 Michael Snyder <msnyder@vmware.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / commands.exp
index 3f7415dbd357d8715adaca54049820025cbe192d..e4f648e191dde1969e8e01da43696afad2ee01d3 100644 (file)
@@ -30,7 +30,7 @@ if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-D
 proc gdbvar_simple_if_test {} {
     global gdb_prompt
 
-    gdb_test "set \$foo = 0" "" "set foo in gdbvar_simple_if_test"
+    gdb_test_no_output "set \$foo = 0" "set foo in gdbvar_simple_if_test"
     # All this test should do is print 0xdeadbeef once.
     gdb_test "if \$foo == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
            "\\\$\[0-9\]* = 0xdeadbeef" "gdbvar_simple_if_test #1"
@@ -42,7 +42,7 @@ proc gdbvar_simple_if_test {} {
 proc gdbvar_simple_while_test {} {
     global gdb_prompt
 
-    gdb_test "set \$foo = 5" "" "set foo in gdbvar_simple_while_test"
+    gdb_test_no_output "set \$foo = 5" "set foo in gdbvar_simple_while_test"
     # This test should print 0xfeedface five times.
     gdb_test "while \$foo > 0\np/x 0xfeedface\nset \$foo -= 1\nend" \
            "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
@@ -52,7 +52,8 @@ proc gdbvar_simple_while_test {} {
 proc gdbvar_complex_if_while_test {} {
     global gdb_prompt
 
-    gdb_test "set \$foo = 4" "" "set foo in gdbvar complex_if_while_test"
+    gdb_test_no_output "set \$foo = 4" \
+       "set foo in gdbvar complex_if_while_test"
     # This test should alternate between 0xdeadbeef and 0xfeedface two times.
     gdb_test "while \$foo > 0\nset \$foo -= 1\nif \(\$foo % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
            "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
@@ -90,7 +91,7 @@ proc progvar_simple_while_test {} {
         return
     }
 
-    gdb_test "set args 5" "" "set args in progvar_simple_while_test"
+    gdb_test_no_output "set args 5" "set args in progvar_simple_while_test"
     if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -110,7 +111,8 @@ proc progvar_complex_if_while_test {} {
         return
     }
 
-    gdb_test "set args 4" "" "set args in progvar_complex_if_while_test"
+    gdb_test_no_output "set args 4" \
+       "set args in progvar_complex_if_while_test"
     if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -128,7 +130,8 @@ proc if_while_breakpoint_command_test {} {
         return
     }
 
-    gdb_test "set args 5" "" "set args in if_while_breakpoint_command_test"
+    gdb_test_no_output "set args 5" \
+       "set args in if_while_breakpoint_command_test"
     if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -168,7 +171,8 @@ proc infrun_breakpoint_command_test {} {
         return
     }
 
-    gdb_test "set args 6" "" "set args in infrun_breakpoint_command_test"
+    gdb_test_no_output "set args 6" \
+       "set args in infrun_breakpoint_command_test"
     if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -202,7 +206,7 @@ proc breakpoint_command_test {} {
         return
     }
 
-    gdb_test "set args 6" "" "set args in breakpoint_command_test"
+    gdb_test_no_output "set args 6" "set args in breakpoint_command_test"
     if { ![runto factorial] } then { gdb_suppress_tests; }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -222,7 +226,8 @@ proc breakpoint_command_test {} {
 proc user_defined_command_test {} {
     global gdb_prompt
 
-    gdb_test "set \$foo = 4" "" "set foo in user_defined_command_test"
+    gdb_test_no_output "set \$foo = 4" \
+       "set foo in user_defined_command_test"
 
     gdb_test_multiple "define mycommand" \
        "define mycommand in user_defined_command_test" {
@@ -258,7 +263,7 @@ proc watchpoint_command_test {} {
        gdb_test "set can-use-hw-watchpoints 0" "" ""
     }
 
-    gdb_test "set args 6" "" "set args in watchpoint_command_test"
+    gdb_test_no_output "set args 6" "set args in watchpoint_command_test"
     if { ![runto factorial] } then { return }
     delete_breakpoints
 
@@ -377,28 +382,26 @@ proc deprecated_command_test {} {
     gdb_test "maintenance deprecate blah" "Can't find command.*" \
           "tried to deprecate non-existing command"
 
-    gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /1/"
+    gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /1/"
     gdb_test "p 5" \
            "Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" \
            "p deprecated warning, with replacement"
     gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /1/"
 
-    gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /2/"
-    gdb_test "maintenance deprecate print \"new_print\"" ""
+    gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /2/"
+    gdb_test_no_output "maintenance deprecate print \"new_print\"" 
     gdb_test "p 5" \
            "Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" \
            "both alias and command are deprecated"
     gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /2/"
 
-    gdb_test "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
-           "" \
+    gdb_test_no_output "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
            "deprecate long command /1/"
     gdb_test "set remote memory-read-packet-size" \
            "Warning: command 'set remote memory-read-packet-size' is deprecated.*Use 'srm'.*" \
            "long command deprecated /1/"
 
-    gdb_test "maintenance deprecate set remote memory-read-packet-size" \
-           "" \
+    gdb_test_no_output "maintenance deprecate set remote memory-read-packet-size" \
            "deprecate long command /2/"
     gdb_test "set remote memory-read-packet-size" \
            "Warning: command 'set remote memory-read-packet-size' is deprecated.*No alternative known.*" \
@@ -417,7 +420,8 @@ proc bp_deleted_in_command_test {} {
         return
     }
 
-    gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
+    gdb_test_no_output "set args 1" \
+       "set args in bp_deleted_in_command_test"
     delete_breakpoints
 
     # Create a breakpoint, and associate a command-list to it, with
@@ -477,7 +481,8 @@ proc temporary_breakpoint_commands {} {
         return
     }
 
-    gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
+    gdb_test_no_output "set args 1" \
+       "set args in temporary_breakpoint_commands"
     delete_breakpoints
 
     # Create a temporary breakpoint, and associate a commands list to it.
@@ -609,7 +614,7 @@ proc gdb_test_no_prompt { command result msg } {
 proc if_commands_test {} {
     global gdb_prompt
 
-    gdb_test "set \$tem = 1" "" "set \$tem in if_commands_test"
+    gdb_test_no_output "set \$tem = 1" "set \$tem in if_commands_test"
 
     set test "if_commands_test 1"
     gdb_test_no_prompt "if \$tem == 2" { >} $test
This page took 0.02688 seconds and 4 git commands to generate.