lib/gdb.exp: New gdb_test_no_output function.

This new testsuite routine allows us to test commands that are not
expected to generate any output.

2010-05-20  Pedro Alves  <pedro@codesourcery.com>
            Joel Brobecker  <brobecker@adacore.com>

        * lib/gdb.exp (gdb_test_no_output): New function.
        * lib/gdb.ada/arrayidx.exp: Use gdb_test_no_output instead of gdb_test
        when testing commands that should produce no output.

Tested on x86_64-linux.
This commit is contained in:
Joel Brobecker 2010-05-20 19:18:58 +00:00
parent 8148cf8d75
commit a7b75dfda1
3 changed files with 34 additions and 6 deletions

View file

@ -41,9 +41,7 @@ runto "p.adb:$bp_location"
# First, print all the arrays without indexes
gdb_test "set print array-indexes off" \
"" \
"set print array-indexes to off"
gdb_test_no_output "set print array-indexes off"
gdb_test "print one_two_three" \
"= \\(1, 2, 3\\)" \
@ -79,9 +77,7 @@ gdb_test "print empty" \
# Next, print all the arrays with the indexes
gdb_test "set print array-indexes on" \
"" \
"set print array-indexes to on"
gdb_test_no_output "set print array-indexes on"
gdb_test "print one_two_three" \
"= \\(1 => 1, 2 => 2, 3 => 3\\)" \