Fixed the horrendous 'unbound symbol nil' bug. Also work on documentation and
unit tests.
This commit is contained in:
parent
3659103dd7
commit
5e6363e6ae
17 changed files with 328 additions and 143 deletions
|
|
@ -1,24 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
return=0;
|
||||
|
||||
echo -n "$0: Append two lists... "
|
||||
|
||||
expected='(a b c d e f)'
|
||||
actual=`echo "(append '(a b c) '(d e f))" | target/psse | tail -1`
|
||||
actual=`echo "(append '(a b c) '(d e f))" | target/psse 2>/dev/null | tail -1`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
return=`echo "${return} + 1" | bc`
|
||||
fi
|
||||
|
||||
echo -n "$0: Append two strings... "
|
||||
|
||||
expected='"hellodere"'
|
||||
actual=`echo '(append "hello" "dere")' | target/psse | tail -1`
|
||||
actual=`echo '(append "hello" "dere")' | target/psse 2>/dev/null | tail -1`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
return=`echo "${return} + 1" | bc`
|
||||
fi
|
||||
|
||||
echo -n "$0: Append keyword to string should error... "
|
||||
|
||||
expected='Exception:'
|
||||
actual=`echo '(append "hello" :dere)' | target/psse 2>/dev/null | sed -r '/^\s*$/d' | awk '{print $1}'`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
return=`echo "${return} + 1" | bc`
|
||||
fi
|
||||
|
||||
exit ${return}
|
||||
Loading…
Add table
Add a link
Reference in a new issue