All unit tests now pass
This commit is contained in:
parent
3c0c1515af
commit
98120d045b
13
unit-tests/nlambda.sh
Normal file
13
unit-tests/nlambda.sh
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
expected='a'
|
||||||
|
actual=`echo "((nlambda (x) x) a)" | target/psse 2> /dev/null | head -2 | tail -1`
|
||||||
|
|
||||||
|
if [ "${expected}" = "${actual}" ]
|
||||||
|
then
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Fail: expected '${expected}', got '${actual}'"
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -1,17 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
log=log.$$
|
|
||||||
value='"Fred"'
|
value='"Fred"'
|
||||||
expected="String cell: character 'F' (70)"
|
expected="String cell: character 'F'"
|
||||||
echo ${value} | target/psse -d > ${log} 2>/dev/null
|
# set! protects "Fred" from the garbage collector.
|
||||||
grep "${expected}" ${log} > /dev/null
|
actual=`echo "(set! x ${value})" | target/psse -d 2>&1 | grep "$expected" | sed 's/ *\(.*\) next.*$/\1/'`
|
||||||
|
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
rm ${log}
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Expected '${expected}', not found in ${log}"
|
echo "Fail: expected '${expected}', got '${actual}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue