All unit tests passing! This is slightly a fix because there is a bug with
the character read after reading a number not being correctly pushed back onto the input stream, but...
This commit is contained in:
parent
6eab3a531a
commit
2d9f4b0439
10 changed files with 85 additions and 34 deletions
13
unit-tests/complex-list.sh
Normal file
13
unit-tests/complex-list.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
expected='(1 2 3 ("Fred") NIL 77354)'
|
||||
actual=`echo '(1 2 3 ("Fred") () 77354 )' | target/psse 2> /dev/null`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
exit 0
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
expected=\"Fred\"
|
||||
expected='"Fred"'
|
||||
actual=`echo ${expected} | target/psse 2> /dev/null`
|
||||
|
||||
if [ "${expected}" = "{$actual}" ]
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
14
unit-tests/string-allocation.sh
Normal file
14
unit-tests/string-allocation.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
value='"Fred"'
|
||||
expected="String cell: character 'F'"
|
||||
echo ${value} | target/psse 2>&1 | grep "${expected}" > /dev/null
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "OK"
|
||||
exit 0
|
||||
else
|
||||
echo "Expected '${expected}', not found"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
expected="\"Strings should be able to include spaces (and other stuff)!\""
|
||||
expected='"Strings should be able to include spaces (and other stuff)!"'
|
||||
actual=`echo ${expected} | target/psse 2> /dev/null`
|
||||
|
||||
if [ "${expected}" = "{$actual}" ]
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue