This once again does NOT compile. I've done work on macros; they don't work yet..

This commit is contained in:
Simon Brooke 2026-03-30 21:49:08 +01:00
parent e3f922a8bf
commit 2b22780ccf
86 changed files with 279 additions and 153 deletions

22
unit-tests/recursion.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
expected='nil 3,628,800'
output=`target/psse <<EOF
(progn
(set! fact
(lambda (n)
(cond ((= n 1) 1)
(t (* n (fact (- n 1)))))))
nil)
(fact 10)
EOF`
actual=`echo $output | tail -1`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
exit 0
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi