Redone fixes to unit tests which I know I did this afternoon, so I've messed
up git somehow.
This commit is contained in:
parent
367f002951
commit
219f082885
12 changed files with 13 additions and 13 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
expected=nil
|
expected=nil
|
||||||
actual=`echo "'()" | target/psse | tail -1`
|
actual=`echo "'()" | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected="\"\""
|
expected="\"\""
|
||||||
actual=`echo '""' | target/psse | tail -1`
|
actual=`echo '""' | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "$expected" = "$actual" ]
|
if [ "$expected" = "$actual" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='5'
|
expected='5'
|
||||||
actual=`echo "(eval 5)" | target/psse | tail -1`
|
actual=`echo "(eval 5)" | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='5'
|
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}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
@ -10,3 +10,4 @@ else
|
||||||
echo "Fail: expected '${expected}', got '${actual}'"
|
echo "Fail: expected '${expected}', got '${actual}'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
2>/dev/null
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='<Special form: ((:primitive . t) (:name . cond))>'
|
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}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# for this test, trailing zeros can be ignored
|
# for this test, trailing zeros can be ignored
|
||||||
expected='5.05'
|
expected='5.05'
|
||||||
actual=`echo "(eval 5.05)" |\
|
actual=`echo "(eval 5.05)" |\
|
||||||
target/psse 2> /dev/null |\
|
target/psse 2>/dev/null |\
|
||||||
sed 's/0*$//' |\
|
sed 's/0*$//' |\
|
||||||
tail -1`
|
tail -1`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='"5"'
|
expected='"5"'
|
||||||
actual=`echo '(eval "5")' | target/psse | tail -1`
|
actual=`echo '(eval "5")' | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='"Fred"'
|
expected='"Fred"'
|
||||||
actual=`echo ${expected} | target/psse | tail -1`
|
actual=`echo ${expected} | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='354'
|
expected='354'
|
||||||
actual=`echo ${expected} | target/psse | tail -1`
|
actual=`echo ${expected} | target/psse 2>/dev/null | tail -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='6'
|
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}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='a'
|
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}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@ result=0
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Create a path from root using compact path notation
|
# Create a path from root using compact path notation
|
||||||
echo -n "$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`
|
actual=`echo "'/:users:simon:functions/assoc" | target/psse 2>&1 | tail -1`
|
||||||
|
|
||||||
echo -n "Path from root (oblist) using compact notation: "
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue