mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Try to avoid `guile-test' failures when it can't display the name of a test.
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.
This commit is contained in:
parent
87bc7c8165
commit
dec84a0a6e
2 changed files with 8 additions and 2 deletions
|
@ -208,6 +208,10 @@
|
|||
;; 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)))
|
||||
|
|
|
@ -22,11 +22,13 @@
|
|||
#: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)
|
||||
|
||||
|
||||
;;; Run a regexp-substitute or regexp-substitute/global test, once
|
||||
;;; providing a real port and once providing #f, requesting direct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue