Added test for expr + stmt

This commit is contained in:
Dmitry Boulytchev 2019-04-11 17:19:32 +03:00
parent 2aa460a25a
commit 7bf40bf26f
4 changed files with 41 additions and 0 deletions

View file

@ -7,6 +7,7 @@ RC=../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@echo $@
@$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log

View file

@ -0,0 +1,13 @@
> 105
105
105
230
105
105
105
230
105
250
1
2
3

26
regression/test054.expr Normal file
View file

@ -0,0 +1,26 @@
x := y := z := 105;
n := read ();
write (x);
write (y);
write (z);
if z then x else y fi := 230;
write (x);
write (y);
write (z);
(write (z); z) := 250;
write (x);
write (y);
write (z);
s := [1, 2, 3, 4];
i := -1;
while n := s[i := i + 1]; n == 1 !! n == 2 !! n == 3 do
write (n)
od

1
regression/test054.input Normal file
View file

@ -0,0 +1 @@
0