summaryrefslogtreecommitdiff
path: root/examples/box-dynamic-module
diff options
context:
space:
mode:
authorMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-07-27 16:11:13 +0000
committerMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-07-27 16:11:13 +0000
commit024001c213e229f9a6ba0066184f59349559003a (patch)
tree9c7613f25394238f09275efebd88194070abe8bf /examples/box-dynamic-module
parenta0f5718e1556066cc536a7871529dc077b70a594 (diff)
downloadguile-024001c213e229f9a6ba0066184f59349559003a.tar.gz
Check in forgotten test scripts.
Diffstat (limited to 'examples/box-dynamic-module')
-rwxr-xr-xexamples/box-dynamic-module/check.test48
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/box-dynamic-module/check.test b/examples/box-dynamic-module/check.test
new file mode 100755
index 000000000..935176d20
--- /dev/null
+++ b/examples/box-dynamic-module/check.test
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# must be run from this directory
+guile=${GUILE-../../libguile/guile}
+
+set -e
+
+#
+# ./box test #1
+#
+$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
+#
+$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
+#
+$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
+#
+$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