Fixed the horrendous 'unbound symbol nil' bug. Also work on documentation and

unit tests.
This commit is contained in:
Simon Brooke 2026-02-14 11:40:52 +00:00
parent 3659103dd7
commit 5e6363e6ae
17 changed files with 328 additions and 143 deletions

View file

@ -1,5 +1,7 @@
#!/bin/bash
result=0
expected=':foo'
actual=`echo "(try ((+ 2 (/ 1 'a))) (:foo))" | target/psse | tail -1`
@ -8,7 +10,7 @@ then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
return=`echo "${return} + 1" | bc`
fi
expected='4'
@ -19,7 +21,7 @@ then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
return=`echo "${return} + 1" | bc`
fi
expected='8'
@ -30,16 +32,18 @@ then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
return=`echo "${return} + 1" | bc`
fi
expected=''
actual=`echo "(try (:body (+ 2 (/ 1 'a))) (:catch *exception*))" | target/psse | tail -1`
expected='Exception: "Cannot divide: not a number"'
actual=`echo "(try (:body (+ 2 (/ 1 'a))) (:catch *exception*))" | target/psse | grep Exception`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
return=`echo "${return} + 1" | bc`
fi
exit ${result}