aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-06 11:51:56 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-06 11:51:56 +0100
commit04c687c034d5aacc2dbd25fb0ab875a75af42f08 (patch)
treefe8dc11edac1b1f1998ffe831d42a7c46b5c7fe2 /tests
parentAllow config.scm to call resolve-interface and module-ref. (diff)
downloadcalp-04c687c034d5aacc2dbd25fb0ab875a75af42f08.tar.gz
calp-04c687c034d5aacc2dbd25fb0ab875a75af42f08.tar.xz
Repair begin1 tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/util.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/util.scm b/tests/util.scm
index 721b7e1b..d308ea2a 100644
--- a/tests/util.scm
+++ b/tests/util.scm
@@ -8,6 +8,7 @@
begin1)
((hnh util path) path-append)
((ice-9 ports) with-output-to-string)
+ ((guile) set!)
)
(test-equal "Filter sorted"
@@ -53,13 +54,10 @@
(test-equal '(#\H #\1 #\2 #\3 #\4 #\5 #\6) tail)))
-(test-equal "begin1 side effects" "World"
- (with-output-to-string
- (lambda ()
- (test-equal "begin1 return value" "Hello"
- (begin1
- "Hello"
- (display "World"))))))
+(let ((value #f))
+ (test-equal "begin1 return value" "Hello"
+ (begin1 "Hello" (set! value "World")))
+ (test-equal "begin1 side effects" "World" value))
(test-equal 0 (iterate 1- zero? 10))