1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 15:10:29 +02:00

* 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.
This commit is contained in:
Martin Grabmüller 2001-07-17 17:12:33 +00:00
parent 0004be0c48
commit 211e9d8a0d
12 changed files with 220 additions and 28 deletions

View file

@ -19,10 +19,17 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
all: libbox-module
EXTRA_DIST = README box.c box-module.scm box-mixed.scm
CFLAGS=`guile-config compile`
LIBS=`guile-config link`
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=../.. ../../libguile/guile -e main -s ../../guile-config/guile-config link` -L../../libguile
TESTS = check.test
#CFLAGS=`guile-config compile`
#LIBS=`guile-config link`
libbox-module: box.lo
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(prefix)/lib -o libbox-module.la

View file

@ -0,0 +1,48 @@
#!/bin/sh
# must be run from this directory
guile=${GUILE-../../libguile/guile}
set -e
#
# ./box test #1
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
rm -f TMP
#
# ./box test #2
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
EOF
rm -f TMP
#
# ./box test #3
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
1
EOF
rm -f TMP
#
# ./box test #4
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-mixed)) (let ((b (make-box-list 1 2 3))) (display b) (newline) (display (box-map 1+ b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
(#<box 1> #<box 2> #<box 3>)
(#<box 2> #<box 3> #<box 4>)
EOF
rm -f TMP
# check.test ends here