Added new unit test for a failing behaviour in eval
This commit is contained in:
parent
a59e120085
commit
7f29c11592
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -12,3 +12,7 @@ nbproject/
|
||||||
src/\.#*
|
src/\.#*
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
|
\.idea/
|
||||||
|
|
||||||
|
post-scarcity\.iml
|
||||||
|
|
|
@ -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
12
unit-tests/eval-quote.sh
Normal 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
|
Loading…
Reference in a new issue