[Git][cmucl/cmucl][issue-139-set-terminal-to-utf8] Change test to use the alias for :locale
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Sat Nov 26 03:19:51 UTC 2022
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
Change test to use the alias for :locale
Previously we tested that `sys:*stdin*` and friends had an external
format of `:utf-8`. Instead, get the alias for `:locale` and verify
that `sys:*stdin*` and friends have that as the external format.
- - - - -
1 changed file:
- tests/issues.lisp
Changes:
=====================================
tests/issues.lisp
=====================================
@@ -701,13 +701,17 @@
(define-test issue.139-default-external-format
(:tag :issues)
(assert-eq :utf-8 stream:*default-external-format*)
- (assert-eq :utf-8 (stream-external-format sys:*stdin*))
- (assert-eq :utf-8 (stream-external-format sys:*stdout*))
- (assert-eq :utf-8 (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 :utf-8 (stream-external-format sys:*tty*))))
+ ;; Find the alias for :locale, and verify it exists and verify that
+ ;; the system streams have that format.
+ (let ((locale-format (gethash :locale stream::*external-format-aliases*)))
+ (assert locale-format)
+ (assert-eq locale-format (stream-external-format sys:*stdin*))
+ (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*)))))
(define-test issue.139-default-external-format-read-file
(:tag :issues)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/967f32851d4f265a2fc0b96eaf8d01b28a5cdb96
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/967f32851d4f265a2fc0b96eaf8d01b28a5cdb96
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20221126/5aa67890/attachment-0001.html>
More information about the cmucl-cvs
mailing list