mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 03:00:19 +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
48
examples/box-dynamic-module/check.test
Executable file
48
examples/box-dynamic-module/check.test
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue