Moved legacy code into archive, ready for a new rapid(?) prototype.
I may regret doing this!
This commit is contained in:
parent
09051a3e63
commit
914c35ead0
114 changed files with 165 additions and 1 deletions
30
archive/unit-tests/string-cons.sh
Executable file
30
archive/unit-tests/string-cons.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
result=0
|
||||
|
||||
echo -n "$0: We should be able to cons a single character string onto the front of a string... "
|
||||
expected='"Test"'
|
||||
actual=`echo '(cons "T" "est")' | target/psse 2>/dev/null | tail -1`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
result=`echo "${result} + 1" | bc`
|
||||
fi
|
||||
|
||||
echo -n "$0: But if the first argument has more than one character, we should get a dotted pair... "
|
||||
expected='("Test" . "pass")'
|
||||
actual=`echo '(cons "Test" "pass")' | target/psse 2>&1 | tail -1`
|
||||
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
result=`echo "${result} + 1" | bc`
|
||||
fi
|
||||
|
||||
exit ${result}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue