1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 13:20:26 +02:00
guile/examples/safe/check.test
Martin Grabmüller 211e9d8a0d * box-module/Makefile.am (TESTS): New variable.
Create `box' on `make all'.

	* box-module/check.test, box-dynamic-module/check.test,
	* box-dynamic/check.test: New files.

	* box-dynamic/Makefile.am (libbox): Create box library on `make
	all'.
	(TESTS): New variable.

	* box/Makefile.am (TESTS): New variable.
	Create `box' program on `make all', use freshly built Guile for
	building.

	* box/check.test: New file.

	* modules/check.test, safe/check.test, scripts/check.test: Set
	GUILE_LOAD_PATH to make the tests run without installed Guile.
2001-07-17 17:12:33 +00:00

36 lines
478 B
Bash
Executable file

#!/bin/sh
# must be run from this directory
guile=${GUILE-../../libguile/guile}
set -e
#
# ./safe untrusted.scm
#
GUILE_LOAD_PATH=../.. $guile -s safe 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_LOAD_PATH=../.. $guile -s safe 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