aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/radix.exp17
2 files changed, 20 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4939075..4e60fa0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2009-01-23 Pedro Alves <pedro@codesourcery.com>
+ * gdb.base/radix.exp: Add tests to ensure that that set
+ input-radix 0 and set output-radix 0 are really rejected.
+
+2009-01-23 Pedro Alves <pedro@codesourcery.com>
+
* gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: Update
copyright years.
diff --git a/gdb/testsuite/gdb.base/radix.exp b/gdb/testsuite/gdb.base/radix.exp
index 172e40f..750fd23 100644
--- a/gdb/testsuite/gdb.base/radix.exp
+++ b/gdb/testsuite/gdb.base/radix.exp
@@ -162,19 +162,32 @@ gdb_test "set radix" \
"Input and output radices now set to decimal 10, hex a, octal 12\." \
"Reset radices"
+gdb_test "set input-radix 0" \
+ "Nonsense input radix ``decimal 0''; input radix unchanged\\." \
+ "Reject input-radix 0"
+gdb_test "show input-radix" \
+ "Default input radix for entering numbers is 10\\." \
+ "Input radix unchanged after rejecting 0"
+
gdb_test "set input-radix 1" \
"Nonsense input radix ``decimal 1''; input radix unchanged\\." \
"Reject input-radix 1"
gdb_test "show input-radix" \
"Default input radix for entering numbers is 10\\." \
- "Input radix unchanged after rejection"
+ "Input radix unchanged after rejecting 1"
+gdb_test "set output-radix 0" \
+ "Unsupported output radix ``decimal 0''; output radix unchanged\\." \
+ "Reject output-radix 0"
+gdb_test "show output-radix" \
+ "Default output radix for printing of values is 10\\." \
+ "Output radix unchanged after rejecting 0"
gdb_test "set output-radix 1" \
"Unsupported output radix ``decimal 1''; output radix unchanged\\." \
"Reject output-radix 1"
gdb_test "show output-radix" \
"Default output radix for printing of values is 10\\." \
- "Output radix unchanged after rejection"
+ "Output radix unchanged after rejecting 1"
gdb_test "set radix 7" \
"Unsupported output radix ``decimal 7''; output radix unchanged\\." \