From a055dacb680d89ff0875c2e73b50998799f8cea9 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 14 Jun 1995 20:05:59 +0000 Subject: * chillvars.exp, string.exp: New tests for LOWER/UPPER/LENGTH --- gdb/testsuite/gdb.chill/ChangeLog | 4 ++++ gdb/testsuite/gdb.chill/chillvars.exp | 12 ++++++++++++ gdb/testsuite/gdb.chill/string.exp | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index cb0dc6e..4df4eb6 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 14 13:07:45 1995 Per Bothner + + * chillvars.exp, string.exp: New tests for LOWER/UPPER/LENGTH. + Wed Jun 7 17:52:38 1995 Per Bothner * chillvars.ch (xptr): Declare new variable. 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 {} { diff --git a/gdb/testsuite/gdb.chill/string.exp b/gdb/testsuite/gdb.chill/string.exp index a4368d9..1f45794 100644 --- a/gdb/testsuite/gdb.chill/string.exp +++ b/gdb/testsuite/gdb.chill/string.exp @@ -46,6 +46,13 @@ proc do_tests {} { gdb_test "p s10(1)" { = '2'} "print string element" gdb_test "p s10(1:3)" { = "234"} "print string slice (:)" gdb_test "p s10(2 up 3)" { = "345"} "print string slice (up)" + + gdb_test "p length(s10)" { = 10} "print string length" + gdb_test "p length(s20)" { = 14} "print varying string length" + gdb_test "p lower(s10)" { = 0} "print string lower" + gdb_test "p upper(s10)" { = 9} "print string upper" + gdb_test "p lower(s20)" { = 0} "print varying string lower" + gdb_test "p upper(s20)" { = 19} "print varying string upper" } # Check to see if we have an executable to test. If not, then either we -- cgit v1.1