1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
guile/examples/safe/check.test
Martin Grabmüller 1321f4ff18 All examples are now built and tested on `make installcheck'
rather than `make check'.
2001-07-24 10:43:34 +00:00

40 lines
512 B
Bash
Executable file

#!/bin/sh
# must be run from this directory
guile=${GUILE-../../libguile/guile}
if test "X$srcdir" = X; then
srcdir=.
fi
set -e
#
# ./safe untrusted.scm
#
$guile -s $srcdir/safe $srcdir/untrusted.scm > TMP
cat <<EOF | diff -u - TMP
1
1
2
6
24
120
720
5040
40320
362880
3628800
EOF
rm -f TMP
#
# ./safe evil.scm
#
$guile -s $srcdir/safe $srcdir/evil.scm > TMP
cat <<EOF | diff -u - TMP
** Exception: (unbound-variable #f "Unbound variable: ~S" (open-input-file) #f)
EOF
rm -f TMP
# check.test ends here