mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +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:
parent
0004be0c48
commit
211e9d8a0d
12 changed files with 220 additions and 28 deletions
|
@ -19,13 +19,11 @@
|
|||
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
|
||||
## 330, Boston, MA 02111-1307 USA
|
||||
|
||||
EXTRA_DIST = README box.c
|
||||
noinst_PROGRAMS = box
|
||||
|
||||
CFLAGS=`guile-config compile`
|
||||
LIBS=`guile-config link`
|
||||
box_SOURCES = box.c
|
||||
|
||||
box: box.o
|
||||
$(CC) $< $(LIBS) -o box
|
||||
EXTRA_DIST = README
|
||||
|
||||
box.o: box.c
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
CFLAGS=-I../..
|
||||
LIBS=`GUILE_LOAD_PATH=../.. ../../libguile/guile -e main -s ../../guile-config/guile-config link` -L../../libguile
|
||||
|
|
38
examples/box-module/check.test
Executable file
38
examples/box-module/check.test
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
# must be run from this directory
|
||||
guile=${GUILE-../../libguile/guile}
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
# ./box test #1
|
||||
#
|
||||
GUILE_LOAD_PATH=../..:. ./box -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
|
||||
#
|
||||
GUILE_LOAD_PATH=../..:. ./box -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
|
||||
#
|
||||
GUILE_LOAD_PATH=../..:. ./box -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
|
||||
|
||||
# check.test ends here
|
Loading…
Add table
Add a link
Reference in a new issue