diff options
author | Per Bothner <per@bothner.com> | 1995-06-14 20:05:59 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1995-06-14 20:05:59 +0000 |
commit | a055dacb680d89ff0875c2e73b50998799f8cea9 (patch) | |
tree | e1486882cfea799b3ce139498feacb64e550427f | |
parent | 6137983598c57aa8557001079b10fa3be8b77ef6 (diff) | |
download | gdb-a055dacb680d89ff0875c2e73b50998799f8cea9.zip gdb-a055dacb680d89ff0875c2e73b50998799f8cea9.tar.gz gdb-a055dacb680d89ff0875c2e73b50998799f8cea9.tar.bz2 |
* chillvars.exp, string.exp: New tests for LOWER/UPPER/LENGTH
-rw-r--r-- | gdb/testsuite/gdb.chill/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/chillvars.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/string.exp | 7 |
3 files changed, 23 insertions, 0 deletions
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 <bothner@kalessin.cygnus.com> + + * chillvars.exp, string.exp: New tests for LOWER/UPPER/LENGTH. + Wed Jun 7 17:52:38 1995 Per Bothner <bothner@kalessin.cygnus.com> * 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 |