mes/mes.test

23 lines
599 B
Plaintext
Raw Normal View History

#! /bin/sh
#set -x
mes=${1-./mes.scm}
echo 0 | $mes
echo 1 | $mes
echo "(car '(0 1))" | $mes
2016-05-29 11:44:03 +00:00
echo "(car (quote (0 1)))" | $mes
echo "(car '(0 1))" | $mes
echo "(cdr '(0 1))" | $mes
echo "(cons 0 1)" | $mes
echo "((lambda (x y) (cons x y)) 0 1)" | $mes
echo "(< 0 0)" | $mes
echo "(< 0 1)" | $mes
# LISP-1.5 label dropped for now
# echo "((label fun\
# (lambda (x) (cons x\
# (cond ((< 0 x) (fun (- x 1)))\
# (#t '())))))\
# 3)" | $mes
2016-07-08 16:02:06 +00:00
echo "'(0 . 1)" | $mes
echo "(cdr '(0 . 1))" | $mes
echo "(define (list . rest) rest)" | $mes