diff options
author | Per Bothner <per@bothner.com> | 1995-03-06 22:11:17 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1995-03-06 22:11:17 +0000 |
commit | 3654c0672f3181c64f67a5b1b59dc9e6f048675f (patch) | |
tree | e828e460c4e5bc189b746f62e563e5c04b4571e9 | |
parent | b73b413106e7b07078ba1daae4e7b0da1dab33a7 (diff) | |
download | gdb-3654c0672f3181c64f67a5b1b59dc9e6f048675f.zip gdb-3654c0672f3181c64f67a5b1b59dc9e6f048675f.tar.gz gdb-3654c0672f3181c64f67a5b1b59dc9e6f048675f.tar.bz2 |
* tuples.ch (setnmode); New module.
* tuples.exp: Add some extra tests.
These are from PR 5024.
-rw-r--r-- | gdb/testsuite/gdb.chill/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/tuples.ch | 23 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/tuples.exp | 11 |
3 files changed, 39 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index 548e4a8..9c725b0 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 6 14:11:01 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * tuples.ch (setnmode); New module. + * tuples.exp: Add some extra tests. + Sat Mar 4 15:16:17 1995 Per Bothner <bothner@kalessin.cygnus.com> * callch.ch, callch.exp, Makefile.in: New test case. diff --git a/gdb/testsuite/gdb.chill/tuples.ch b/gdb/testsuite/gdb.chill/tuples.ch index e1063f5..399773a 100644 --- a/gdb/testsuite/gdb.chill/tuples.ch +++ b/gdb/testsuite/gdb.chill/tuples.ch @@ -31,3 +31,26 @@ DCL i INT; i := 0; END x; + +setmode: MODULE /* This is from Cygnus PR chill/5024. */ + +NEWMODE day = SET( monday, tuesday, wednesday, thursday, friday, saturday, sunday ); +NEWMODE dow = POWERSET day; + +DCL d day; +DCL w dow; + +printdow: PROC( w dow ); + DCL d day; + DO FOR d in w; + WRITETEXT( stdout, "%C ", d ); + OD; +END; + +d := monday; +w := dow[monday : friday]; +printdow( w ); + +printdow( dow[LOWER(dow) : UPPER(dow)] ); + +END setmode; diff --git a/gdb/testsuite/gdb.chill/tuples.exp b/gdb/testsuite/gdb.chill/tuples.exp index 8d5bc2a..4f7803a 100644 --- a/gdb/testsuite/gdb.chill/tuples.exp +++ b/gdb/testsuite/gdb.chill/tuples.exp @@ -97,6 +97,17 @@ proc do_tests {} { send "set v_arrbool(3 : 5) := \[ true, true, false \]\n" expect -re "$prompt $" gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2" + + +# These tests are from Cygnus PR chill/5024: + send "break printdow\n" ; expect -re "$prompt $" + send "continue\n" ; expect -re "$prompt $" + send "set var w:= dow\[monday\]\n" ; expect -re "$prompt $" + test_print_accept "print w" "\\\[monday\\\]" \ + "print bitstring after assignment" + send "set var w:=\[\]\n" ; expect -re "$prompt $" + test_print_accept "print w" "\\\[\\\]" \ + "print bitstring after assignment of \[\]" } # Check to see if we have an executable to test. If not, then either we |