diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2022-01-08 14:43:00 +0400 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2022-01-08 14:43:00 +0400 |
commit | bc2e7c7daaae1595288c3ecedd2902c5bed72e79 (patch) | |
tree | 5883f2ea61c5d42da2b04c471514c49c885b026c /gdb/testsuite | |
parent | 3747999c6bd40a7ac905ef306a82214b336067b6 (diff) | |
download | gdb-bc2e7c7daaae1595288c3ecedd2902c5bed72e79.zip gdb-bc2e7c7daaae1595288c3ecedd2902c5bed72e79.tar.gz gdb-bc2e7c7daaae1595288c3ecedd2902c5bed72e79.tar.bz2 |
gdb: testsuite: show print array-indexes after set in arrayidx.exp
Add "show print array-indexes" testcases after set print array-indexes
to off or on.
Without this patch:
PASS: gdb.base/arrayidx.exp: set print array-indexes to off
PASS: gdb.base/arrayidx.exp: print array with array-indexes off
PASS: gdb.base/arrayidx.exp: set print array-indexes to on
PASS: gdb.base/arrayidx.exp: print array with array-indexes on
With this patch:
PASS: gdb.base/arrayidx.exp: set print array-indexes to off
PASS: gdb.base/arrayidx.exp: show print array-indexes is off
PASS: gdb.base/arrayidx.exp: print array with array-indexes off
PASS: gdb.base/arrayidx.exp: set print array-indexes to on
PASS: gdb.base/arrayidx.exp: show print array-indexes is on
PASS: gdb.base/arrayidx.exp: print array with array-indexes on
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/arrayidx.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp index 6526dd2..c904a77 100644 --- a/gdb/testsuite/gdb.base/arrayidx.exp +++ b/gdb/testsuite/gdb.base/arrayidx.exp @@ -36,6 +36,10 @@ if ![runto_main] then { gdb_test_no_output "set print array-indexes off" \ "set print array-indexes to off" +gdb_test "show print array-indexes" \ + "Printing of array indexes is off\\." \ + "show print array-indexes is off" + gdb_test "print array" \ "\\{1, 2, 3, 4\\}" \ "print array with array-indexes off" @@ -45,6 +49,10 @@ gdb_test "print array" \ gdb_test_no_output "set print array-indexes on" \ "set print array-indexes to on" +gdb_test "show print array-indexes" \ + "Printing of array indexes is on\\." \ + "show print array-indexes is on" + gdb_test "print array" \ "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ "print array with array-indexes on" |