mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-30 02:28:27 +00:00
merge
This commit is contained in:
parent
c9bfede950
commit
4d54809acb
6 changed files with 106 additions and 32 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)
|
||||
|
|
|
|||
|
|
@ -5,3 +5,9 @@
|
|||
2
|
||||
3
|
||||
5
|
||||
5
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
|
|
|||
|
|
@ -27,4 +27,12 @@ case `a (1, 2, 3, 4, 5) of
|
|||
| `a (_, _, _) -> write (3)
|
||||
| `a (_, _, _, _) -> write (4)
|
||||
| `a (_, _, _, _, _) -> write (5)
|
||||
esac
|
||||
esac;
|
||||
|
||||
write (`a (1, 2, 3, 4, 5).length);
|
||||
|
||||
write (`a (1, 2, 3, 4, 5)[0]);
|
||||
write (`a (1, 2, 3, 4, 5)[1]);
|
||||
write (`a (1, 2, 3, 4, 5)[2]);
|
||||
write (`a (1, 2, 3, 4, 5)[3]);
|
||||
write (`a (1, 2, 3, 4, 5)[4])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue