And now the interpreter works (I think) correctly!

This commit is contained in:
Simon Brooke 2018-12-12 21:12:49 +00:00
parent 676b231743
commit 434c17eb0e
5 changed files with 25 additions and 11 deletions

12
unit-tests/intepreter.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
expected='6'
actual=`echo "(apply '(lambda (x y z) (/ (* y z) x)) '(2 3 4))" | target/psse 2> /dev/null | head -2 | tail -1`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi