diff options
Diffstat (limited to 'test-suite/tests/format.test')
-rw-r--r-- | test-suite/tests/format.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test-suite/tests/format.test b/test-suite/tests/format.test index 334984703..cc31942cc 100644 --- a/test-suite/tests/format.test +++ b/test-suite/tests/format.test @@ -24,6 +24,22 @@ #:use-module (ice-9 format)) +(with-test-prefix "simple-format" + (pass-if-exception "current-output-port is closed" + exception:wrong-type-arg + ;; This used to segfault in Guile <= 2.0.10. + (let ((old (current-output-port)) + (new (%make-void-port "w"))) + (dynamic-wind + (lambda () + (set-current-output-port new) + (close-port new)) + (lambda () + (simple-format #t "hello, closed port!") + #t) + (lambda () + (set-current-output-port old)))))) + ;;; FORMAT Basic Output (with-test-prefix "format basic output" |