aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/max-value-size.exp2
-rw-r--r--gdb/testsuite/gdb.base/options.exp47
-rw-r--r--gdb/testsuite/gdb.base/settings.exp2
-rw-r--r--gdb/testsuite/gdb.base/with.exp2
4 files changed, 30 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.base/max-value-size.exp b/gdb/testsuite/gdb.base/max-value-size.exp
index 0a001e9..cc9ae77 100644
--- a/gdb/testsuite/gdb.base/max-value-size.exp
+++ b/gdb/testsuite/gdb.base/max-value-size.exp
@@ -92,4 +92,4 @@ gdb_test "set max-value-size 1" \
gdb_test "set max-value-size 0" \
"max-value-size set too low, increasing to \[0-9\]+ bytes"
gdb_test "set max-value-size -5" \
- "only -1 is allowed to set as unlimited"
+ "integer -5 out of range"
diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp
index 486192e..5a2b6d8 100644
--- a/gdb/testsuite/gdb.base/options.exp
+++ b/gdb/testsuite/gdb.base/options.exp
@@ -98,19 +98,22 @@ proc make_cmd {variant} {
# test-options xxx", with no flag/option set. OPERAND is the expected
# operand.
proc expect_none {operand} {
- return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -string '' -- $operand"
+ return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint-unl 0 -pint-unl 0\
+ -string '' -- $operand"
}
# Return a string for the expected result of running "maint
# test-options xxx", with -flag set. OPERAND is the expected operand.
proc expect_flag {operand} {
- return "-flag 1 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -string '' -- $operand"
+ return "-flag 1 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint-unl 0 -pint-unl 0\
+ -string '' -- $operand"
}
# Return a string for the expected result of running "maint
# test-options xxx", with -bool set. OPERAND is the expected operand.
proc expect_bool {operand} {
- return "-flag 0 -xx1 0 -xx2 0 -bool 1 -enum xxx -uint 0 -zuint-unl 0 -string '' -- $operand"
+ return "-flag 0 -xx1 0 -xx2 0 -bool 1 -enum xxx -uint-unl 0 -pint-unl 0\
+ -string '' -- $operand"
}
# Return a string for the expected result of running "maint
@@ -118,10 +121,12 @@ proc expect_bool {operand} {
# OPTION determines which option to expect set. OPERAND is the
# expected operand.
proc expect_integer {option val operand} {
- if {$option == "uinteger"} {
- return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint $val -zuint-unl 0 -string '' -- $operand"
- } elseif {$option == "zuinteger-unlimited"} {
- return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl $val -string '' -- $operand"
+ if {$option == "uinteger-unlimited"} {
+ return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint-unl $val\
+ -pint-unl 0 -string '' -- $operand"
+ } elseif {$option == "pinteger-unlimited"} {
+ return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint-unl 0\
+ -pint-unl $val -string '' -- $operand"
} else {
error "unsupported option: $option"
}
@@ -138,18 +143,19 @@ proc expect_string {str operand} {
&& [string range $str end end] == "'")} {
set str [string range $str 1 end-1]
}
- return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -string '$str' -- $operand"
+ return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint-unl 0 -pint-unl 0\
+ -string '$str' -- $operand"
}
set all_options {
"-bool"
"-enum"
"-flag"
+ "-pinteger-unlimited"
"-string"
- "-uinteger"
+ "-uinteger-unlimited"
"-xx1"
"-xx2"
- "-zuinteger-unlimited"
}
# Basic option-machinery + "print" command integration tests.
@@ -604,7 +610,8 @@ proc_with_prefix test-flag {variant} {
# Extract twice the same flag, separated by one space.
gdb_test "$cmd -xx1 -xx2 -xx1 -xx2 -xx1 -- non flags args" \
- "-flag 0 -xx1 1 -xx2 1 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -string '' -- non flags args"
+ "-flag 0 -xx1 1 -xx2 1 -bool 0 -enum xxx -uint-unl 0 -pint-unl 0\
+ -string '' -- non flags args"
# Extract 2 known flags in front of unknown flags.
gdb_test "$cmd -xx1 -xx2 -a -b -c -xx1 --" \
@@ -822,13 +829,13 @@ proc_with_prefix test-boolean {variant} {
}
# Uinteger option tests. OPTION is which integer option we're
-# testing. Can be "uinteger" or "zuinteger-unlimited".
+# testing. Can be "uinteger-unlimited" or "pinteger-unlimited".
proc_with_prefix test-uinteger {variant option} {
global all_options
set cmd "[make_cmd $variant] -$option"
- # Test completing a uinteger option:
+ # Test completing an integer option:
res_test_gdb_complete_multiple \
"1 [expect_none ""]" \
"$cmd " "" "" {
@@ -852,7 +859,7 @@ proc_with_prefix test-uinteger {variant option} {
gdb_test "$cmd 1 -- 999" [expect_integer $option "1" "999"]
gdb_test "$cmd unlimited -- 999" \
[expect_integer $option "unlimited" "999"]
- if {$option == "zuinteger-unlimited"} {
+ if {$option == "pinteger-unlimited"} {
gdb_test "$cmd -1 --" [expect_integer $option "unlimited" ""]
gdb_test "$cmd 0 --" [expect_integer $option "0" ""]
} else {
@@ -865,7 +872,7 @@ proc_with_prefix test-uinteger {variant option} {
"Expected integer at: unlimitedx --"
# Don't offer completions until we're past the
- # -uinteger/-zuinteger-unlimited argument.
+ # -uinteger-unlimited/-pinteger-unlimited argument.
res_test_gdb_complete_none \
"1 [expect_none ""]" \
"$cmd 1"
@@ -878,15 +885,15 @@ proc_with_prefix test-uinteger {variant option} {
}
# Try "-1".
- if {$option == "uinteger"} {
- # -1 is invalid uinteger.
+ if {$option == "uinteger-unlimited"} {
+ # -1 is invalid uinteger-unlimited.
foreach value {"-1" "-1 "} {
res_test_gdb_complete_none \
"1 [expect_none ""]" \
"$cmd $value"
}
} else {
- # -1 is valid for zuinteger-unlimited.
+ # -1 is valid for pinteger-unlimited.
res_test_gdb_complete_none \
"1 [expect_none ""]" \
"$cmd -1"
@@ -914,7 +921,7 @@ proc_with_prefix test-uinteger {variant option} {
res_test_gdb_complete_none "0 " "$cmd 1 "
}
- # Test completing non-option arguments after "-uinteger 1 ".
+ # Test completing non-option arguments after "-uinteger-unlimited 1 ".
foreach operand {"x" "x " "1a" "1a " "1-" "1- "} {
if {$variant == "require-delimiter"} {
res_test_gdb_complete_none \
@@ -1032,7 +1039,7 @@ foreach_with_prefix cmd {
test-misc $cmd
test-flag $cmd
test-boolean $cmd
- foreach subcmd {"uinteger" "zuinteger-unlimited" } {
+ foreach subcmd {"uinteger-unlimited" "pinteger-unlimited" } {
test-uinteger $cmd $subcmd
}
test-enum $cmd
diff --git a/gdb/testsuite/gdb.base/settings.exp b/gdb/testsuite/gdb.base/settings.exp
index f2215c2..e542039 100644
--- a/gdb/testsuite/gdb.base/settings.exp
+++ b/gdb/testsuite/gdb.base/settings.exp
@@ -143,7 +143,7 @@ proc test-integer {variant} {
if {$variant == "zuinteger-unlimited"} {
# -1 means unlimited. Other negative values are rejected. -1
# -is tested further below, along the "unlimited" tests.
- gdb_test "$set_cmd -2" "only -1 is allowed to set as unlimited"
+ gdb_test "$set_cmd -2" "integer -2 out of range"
check_type "test-settings $variant" "type = int"
} elseif {$variant == "uinteger" || $variant == "zuinteger"} {
# Negative values are not accepted.
diff --git a/gdb/testsuite/gdb.base/with.exp b/gdb/testsuite/gdb.base/with.exp
index 75f4ddc..233dc30 100644
--- a/gdb/testsuite/gdb.base/with.exp
+++ b/gdb/testsuite/gdb.base/with.exp
@@ -104,7 +104,7 @@ with_test_prefix "maint" {
test_with_error "zuinteger" "" \
"Argument required \\(integer to set it to\\)\\."
test_with_error "zuinteger-unlimited" "-2" \
- "only -1 is allowed to set as unlimited"
+ "integer -2 out of range"
test_with_error "zuinteger-unlimited" "" \
"Argument required \\(integer to set it to, or \"unlimited\"\\)\\."
test_with_error "filename" "" \