mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 23:58:47 +00:00
merge
This commit is contained in:
parent
155ad46ec2
commit
5bfc0a08ec
5 changed files with 22 additions and 70 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)
|
||||
|
|
|
|||
|
|
@ -3,11 +3,4 @@
|
|||
3
|
||||
1
|
||||
2
|
||||
3
|
||||
5
|
||||
5
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
3
|
||||
|
|
@ -14,25 +14,8 @@ case 3 of
|
|||
esac;
|
||||
|
||||
case `a (1, 2, 3) of
|
||||
`a -> write (1)
|
||||
`b -> write (1)
|
||||
| a@`a (_, _, _) -> case a of
|
||||
`a (x, y, z) -> write (x); write (y); write (z)
|
||||
esac
|
||||
esac;
|
||||
|
||||
case `a (1, 2, 3, 4, 5) of
|
||||
`a -> write (0)
|
||||
| `a (_) -> write (1)
|
||||
| `a (_, _) -> write (2)
|
||||
| `a (_, _, _) -> write (3)
|
||||
| `a (_, _, _, _) -> write (4)
|
||||
| `a (_, _, _, _, _) -> write (5)
|
||||
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])
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue