Some improvement, but two unit tests fail.

This commit is contained in:
simon 2017-08-14 17:57:23 +01:00
parent 48d4de668e
commit 31176e1f39
21 changed files with 288 additions and 85 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`
actual=`echo '(1 2 3 ("Fred") () 77354)' | target/psse 2> /dev/null | head -1`
if [ "${expected}" = "${actual}" ]
then

View file

@ -0,0 +1,19 @@
#!/bin/bash
#
# File: empty-list.sh.bash
# Author: simon
#
# Created on 14-Aug-2017, 15:06:40
#
expected=nil
actual=`echo '()' | target/psse 2> /dev/null | head -1`
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="\"\""
actual=`echo '""' | target/psse 2> /dev/null`
actual=`echo '""' | target/psse 2> /dev/null | head -1`
if [ "$expected" = "$actual" ]
then

View file

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

View file

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

View file

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

View file

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

View file

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

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 | head -1`
if [ "${expected}" = "${actual}" ]
then

View file

@ -1,7 +1,7 @@
#!/bin/bash
expected='"Strings should be able to include spaces (and other stuff)!"'
actual=`echo ${expected} | target/psse 2> /dev/null`
actual=`echo ${expected} | target/psse 2> /dev/null | head -1`
if [ "${expected}" = "${actual}" ]
then