Raymond Toy pushed to branch issue-139-set-terminal-to-utf8 at cmucl / cmucl
Commits: a34aa173 by Raymond Toy at 2022-12-04T08:28:25-08:00 Test external format if sys:*tty* is a two-way-stream
`sys:*tty*` can be an `fd-stream` or `two-way-stream`. Test that the external format in both cases has the expected value.
- - - - -
1 changed file:
- tests/issues.lisp
Changes:
===================================== tests/issues.lisp ===================================== @@ -709,9 +709,14 @@ (assert-eq locale-format (stream-external-format sys:*stdout*)) (assert-eq locale-format (stream-external-format sys:*stderr*)) ;; sys:*tty* can either be an fd-stream or a two-way-stream. - ;; stream-external-format doesn't work for a two-way-stream. - (unless (typep sys:*tty* 'two-way-stream) - (assert-eq locale-format (stream-external-format sys:*tty*))))) + (etypecase sys:*tty* + (system:fd-stream + (assert-eq locale-format (stream-external-format sys:*tty*))) + (two-way-stream + (assert-eq locale-format + (stream-external-format (two-way-stream-input-stream sys:*tty*))) + (assert-eq locale-format + (stream-external-format (two-way-stream-output-stream sys:*tty*)))))))
(define-test issue.139-default-external-format-read-file (:tag :issues)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a34aa173120c6efd4769670a...