Sorted out some interesting buglets in read and print (although there is

still one I know of). More unit tests, and all pass. Not evalling yet.

Good day's work.
This commit is contained in:
Simon Brooke 2017-01-20 18:24:48 +00:00
parent 770767c11e
commit e968b30bbc
12 changed files with 325 additions and 106 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected='(1 2 3 ("Fred") NIL 77354)'
actual=`echo '(1 2 3 ("Fred") () 77354 )' | target/psse 2> /dev/null`
expected='(1 2 3 ("Fred") nil 77354)'
actual=`echo '(1 2 3 ("Fred") () 77354)' | target/psse 2> /dev/null`
if [ "${expected}" = "${actual}" ]
then

View file

@ -1,6 +1,6 @@
#!/bin/bash
expected=NIL
expected=nil
actual=`echo '()' | target/psse 2> /dev/null`
if [ "${expected}" = "${actual}" ]

13
unit-tests/quote.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
expected='(quote Fred)'
actual=`echo "'Fred" | target/psse 2> /dev/null`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
exit 0
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi

13
unit-tests/quoted-list.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
expected='(quote (123 (4 (5 nil)) Fred))'
actual=`echo "'(123 (4 (5 ())) Fred)" | target/psse 2> /dev/null`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
exit 0
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected="(1 2 3)"
actual=`echo '(1 2 3 )' | target/psse 2> /dev/null`
actual=`echo '(1 2 3)' | target/psse 2> /dev/null`
if [ "${expected}" = "${actual}" ]
then