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
31
archive/unit-tests/mapcar.sh
Normal file
31
archive/unit-tests/mapcar.sh
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
result=0
|
||||
|
||||
#####################################################################
|
||||
# Create an empty map using map notation
|
||||
expected='(2 3 4)'
|
||||
actual=`echo "(mapcar (lambda (n) (+ n 1)) '(1 2 3))" | target/psse | tail -1`
|
||||
|
||||
echo -n "$0: Mapping interpreted function across list: "
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
result=1
|
||||
fi
|
||||
|
||||
#####################################################################
|
||||
# Create an empty map using make-map
|
||||
expected='("INTR" "REAL" "RTIO" "KEYW")'
|
||||
actual=`echo "(mapcar type '(1 1.0 1/2 :one))" | target/psse | tail -1`
|
||||
|
||||
echo -n "$0: Mapping primitive function across list: "
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
result=1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue