Redone fixes to unit tests which I know I did this afternoon, so I've messed

up git somehow.
This commit is contained in:
Simon Brooke 2026-02-14 20:36:07 +00:00
parent 367f002951
commit 219f082885
12 changed files with 13 additions and 13 deletions

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected='5'
actual=`echo "(eval '(add 2 3))" | target/psse | tail -1`
actual=`echo "(eval '(add 2 3))" | target/psse 2>/dev/null | tail -1`
if [ "${expected}" = "${actual}" ]
then
@ -10,3 +10,4 @@ else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi
2>/dev/null

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected='<Special form: ((:primitive . t) (:name . cond))>'
actual=`echo "(eval 'cond)" | target/psse | tail -1`
actual=`echo "(eval 'cond)" | target/psse 2>/dev/null | tail -1`
if [ "${expected}" = "${actual}" ]
then

View file

@ -3,7 +3,7 @@
# for this test, trailing zeros can be ignored
expected='5.05'
actual=`echo "(eval 5.05)" |\
target/psse 2> /dev/null |\
target/psse 2>/dev/null |\
sed 's/0*$//' |\
tail -1`

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected='6'
actual=`echo "(apply '(lambda (x y z) (/ (* y z) x)) '(2 3 4))" | target/psse | tail -1`
actual=`echo "(apply '(lambda (x y z) (/ (* y z) x)) '(2 3 4))" | target/psse 2>/dev/null | tail -1`
if [ "${expected}" = "${actual}" ]
then

View file

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

View file

@ -5,10 +5,9 @@ result=0
#####################################################################
# Create a path from root using compact path notation
echo -n "$0: Create a path from root using compact path notation... "
expected='(-> oblist :users :simon :functions (quote assoc))'
expected='(-> (oblist) :users :simon :functions (quote assoc))'
actual=`echo "'/:users:simon:functions/assoc" | target/psse 2>&1 | tail -1`
echo -n "Path from root (oblist) using compact notation: "
if [ "${expected}" = "${actual}" ]
then
echo "OK"