* tuples.ch (setnmode); New module.
* tuples.exp: Add some extra tests. These are from PR 5024.
This commit is contained in:
parent
b73b413106
commit
3654c0672f
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue