Fix `define-inlinable' in SRFI-9 so that arguments are evaluated only once.
[bpt/guile.git] / test-suite / tests / srfi-9.test
index f8006c4..f26a7a2 100644 (file)
   (pass-if-exception "set-y! on bar" exception:wrong-type-arg
      (set-y! b 99)))
 
+(with-test-prefix "side-effecting arguments"
+
+  (pass-if "predicate"
+    (let ((x 0))
+      (and (foo? (begin (set! x (+ x 1)) f))
+           (= x 1)))))
+
 (with-test-prefix "non-toplevel"
-    
+
   (define-record-type :frotz (make-frotz a b) frotz?
     (a frotz-a) (b frotz-b set-frotz-b!))