This can happen, e.g., when printing "UNRESOLVED: regexp.test: TEST-NAME",
where TEST-NAME contains characters that cannot be converted to the
encoding of the current output or error port.
* test-suite/guile-test (main): Set the conversion strategy for the
output and error ports to `escape'.
* test-suite/tests/regexp.test (current-output-port): Likewise.
;; Allow for arbitrary Unicode characters in the log file.
(set-port-encoding! log-port "UTF-8")
+ ;; Don't fail if we can't display a test name to stdout/stderr.
+ (set-port-conversion-strategy! (current-output-port) 'escape)
+ (set-port-conversion-strategy! (current-error-port) 'escape)
+
;; Register some reporters.
(let ((global-pass #t)
(counter (make-count-reporter)))
#:use-module (srfi srfi-1)
#:use-module (ice-9 regex))
-(set-port-conversion-strategy! (current-output-port) 'escape)
-
(if (defined? 'setlocale)
(setlocale LC_ALL "C"))
+;; Don't fail if we can't display a test name to stdout/stderr.
+(set-port-conversion-strategy! (current-output-port) 'escape)
+(set-port-conversion-strategy! (current-error-port) 'escape)
+
\f
;;; Run a regexp-substitute or regexp-substitute/global test, once
;;; providing a real port and once providing #f, requesting direct