mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
'as' pattern
This commit is contained in:
parent
be89ee983a
commit
8a4874797b
8 changed files with 89 additions and 31 deletions
|
|
@ -7,9 +7,9 @@ RC=../src/rc.opt
|
|||
check: $(TESTS)
|
||||
|
||||
$(TESTS): %: %.expr
|
||||
@$(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
|
||||
$(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
|
||||
|
||||
clean:
|
||||
rm -f test*.log *.s *~ $(TESTS)
|
||||
|
|
|
|||
6
regression/orig/test046.log
Normal file
6
regression/orig/test046.log
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
> 3
|
||||
3
|
||||
3
|
||||
1
|
||||
2
|
||||
3
|
||||
21
regression/test046.expr
Normal file
21
regression/test046.expr
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
n := read ();
|
||||
|
||||
case 3 of
|
||||
a -> write (a)
|
||||
| _ -> write (0)
|
||||
esac;
|
||||
|
||||
case 3 of
|
||||
a -> write (a)
|
||||
esac;
|
||||
|
||||
case 3 of
|
||||
a@_ -> write (a)
|
||||
esac;
|
||||
|
||||
case `a (1, 2, 3) of
|
||||
`b -> write (1)
|
||||
| a@`a (_, _, _) -> case a of
|
||||
`a (x, y, z) -> write (x); write (y); write (z)
|
||||
esac
|
||||
esac
|
||||
1
regression/test046.input
Normal file
1
regression/test046.input
Normal file
|
|
@ -0,0 +1 @@
|
|||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue