aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.chill/chillvars.exp
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-06-14 20:05:59 +0000
committerPer Bothner <per@bothner.com>1995-06-14 20:05:59 +0000
commita055dacb680d89ff0875c2e73b50998799f8cea9 (patch)
treee1486882cfea799b3ce139498feacb64e550427f /gdb/testsuite/gdb.chill/chillvars.exp
parent6137983598c57aa8557001079b10fa3be8b77ef6 (diff)
downloadgdb-a055dacb680d89ff0875c2e73b50998799f8cea9.zip
gdb-a055dacb680d89ff0875c2e73b50998799f8cea9.tar.gz
gdb-a055dacb680d89ff0875c2e73b50998799f8cea9.tar.bz2
* chillvars.exp, string.exp: New tests for LOWER/UPPER/LENGTH
Diffstat (limited to 'gdb/testsuite/gdb.chill/chillvars.exp')
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/chillvars.exp b/gdb/testsuite/gdb.chill/chillvars.exp
index 4651826..2828347 100644
--- a/gdb/testsuite/gdb.chill/chillvars.exp
+++ b/gdb/testsuite/gdb.chill/chillvars.exp
@@ -83,6 +83,9 @@ proc test_CHAR {} {
gdb_test "ptype printable_char" "type = (CHAR|char)"
gdb_test "whatis printable_char" "type = (CHAR|char)"
gdb_test "print printable_char" " = 'a'"
+
+ gdb_test "print lower(char)" " = C'00'"
+ gdb_test "print upper(char)" " = C'ff'"
}
proc test_BYTE {} {
@@ -92,6 +95,11 @@ proc test_BYTE {} {
gdb_test "ptype byte_high" "type = (BYTE|byte)"
gdb_test "whatis byte_high" "type = (BYTE|byte)"
gdb_test "print byte_high" " = 127"
+
+ gdb_test "print lower(byte)" " = -128"
+ gdb_test "print upper(byte)" " = 127"
+ gdb_test "print lower(byte_high)" " = -128"
+ gdb_test "print upper(byte_high)" " = 127"
}
proc test_UBYTE {} {
@@ -241,6 +249,10 @@ proc test_arrays {} {
gdb_test "ptype longrealtable2" "type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
gdb_test_exact "print longrealtable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+
+ gdb_test "print length(longrealtable2)" {= 5}
+ gdb_test "print lower(longrealtable2)" {= 5}
+ gdb_test "print upper(longrealtable2)" {= 9}
}
proc test_strings {} {