Raymond Toy pushed to branch issue-139-set-terminal-to-utf8 at cmucl / cmucl
Commits:
-
967f3285
by Raymond Toy at 2022-11-25T19:18:25-08:00
1 changed file:
Changes:
... | ... | @@ -701,13 +701,17 @@ |
701 | 701 | (define-test issue.139-default-external-format
|
702 | 702 | (:tag :issues)
|
703 | 703 | (assert-eq :utf-8 stream:*default-external-format*)
|
704 | - (assert-eq :utf-8 (stream-external-format sys:*stdin*))
|
|
705 | - (assert-eq :utf-8 (stream-external-format sys:*stdout*))
|
|
706 | - (assert-eq :utf-8 (stream-external-format sys:*stderr*))
|
|
707 | - ;; sys:*tty* can either be an fd-stream or a two-way-stream.
|
|
708 | - ;; stream-external-format doesn't work for a two-way-stream.
|
|
709 | - (unless (typep sys:*tty* 'two-way-stream)
|
|
710 | - (assert-eq :utf-8 (stream-external-format sys:*tty*))))
|
|
704 | + ;; Find the alias for :locale, and verify it exists and verify that
|
|
705 | + ;; the system streams have that format.
|
|
706 | + (let ((locale-format (gethash :locale stream::*external-format-aliases*)))
|
|
707 | + (assert locale-format)
|
|
708 | + (assert-eq locale-format (stream-external-format sys:*stdin*))
|
|
709 | + (assert-eq locale-format (stream-external-format sys:*stdout*))
|
|
710 | + (assert-eq locale-format (stream-external-format sys:*stderr*))
|
|
711 | + ;; sys:*tty* can either be an fd-stream or a two-way-stream.
|
|
712 | + ;; stream-external-format doesn't work for a two-way-stream.
|
|
713 | + (unless (typep sys:*tty* 'two-way-stream)
|
|
714 | + (assert-eq locale-format (stream-external-format sys:*tty*)))))
|
|
711 | 715 | |
712 | 716 | (define-test issue.139-default-external-format-read-file
|
713 | 717 | (:tag :issues)
|