Added new unit test for a failing behaviour in eval

This commit is contained in:
Simon Brooke 2018-12-05 09:33:37 +00:00
parent a59e120085
commit 7f29c11592
3 changed files with 17 additions and 1 deletions

4
.gitignore vendored
View file

@ -12,3 +12,7 @@ nbproject/
src/\.#* src/\.#*
*.log *.log
\.idea/
post-scarcity\.iml

View file

@ -483,7 +483,7 @@ lisp_cond( struct stack_frame *frame, struct cons_pointer env ) {
frame); frame);
} }
} }
/* TODO: if there are more than 8 caluses we need to continue into the /* TODO: if there are more than 8 clauses we need to continue into the
* remainder */ * remainder */
return result; return result;

12
unit-tests/eval-quote.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
expected='5'
actual=`echo "(eval '(add 2 3))" | 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