Use UTF-8 when processing specification tests.

* tests/spec/oil.scm: Set the encoding on the input and output ports
to UTF-8.
This commit is contained in:
Timothy Sample 2019-08-20 17:08:51 -04:00
parent 5a27fd59cc
commit 1b41a34ce2
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,11 @@
(format #t "Removing tests from ~a:~%" file)
(with-atomic-file-replacement file
(lambda (in out)
;; The Oil tests are encoded as UTF-8, so we
;; set the encoding on the two ports to ensure
;; that Guile preserves non-ASCII characters.
(set-port-encoding! in "UTF-8")
(set-port-encoding! out "UTF-8")
(let loop ((line (read-line in 'concat))
(transformers #t))
(cond