[Git][cmucl/cmucl][issue-139a-default-external-format-utf8] Add test for default external format and system streams

Raymond Toy (@rtoy) gitlab at common-lisp.net
Fri Sep 23 22:14:30 UTC 2022



Raymond Toy pushed to branch issue-139a-default-external-format-utf8 at cmucl / cmucl


Commits:
344b9482 by Raymond Toy at 2022-09-23T15:14:21-07:00
Add test for default external format and system streams

Verify that the default external format is :utf-8 and that all the
system streams use :utf-8.

- - - - -


1 changed file:

- tests/issues.lisp


Changes:

=====================================
tests/issues.lisp
=====================================
@@ -579,3 +579,20 @@
 	with user-info = (unix:unix-getpwuid uid)
 	while user-info
 	finally (assert-false user-info)))
+
+(define-test issue-139.1
+    (:tag :issues)
+  ;; Verify the value of the default external format and that system streams use :utf-8.
+  (assert-eql :utf-8 stream:*default-external-format*)
+  (assert-eql :utf-8 (stream-external-format sys:*stdin*))
+  (assert-eql :utf-8 (stream-external-format sys:*stdout*))
+  (assert-eql :utf-8 (stream-external-format sys:*stderr*))
+  (assert-eql :utf-8 (stream-external-format sys:*tty*))
+  ;; Check that printing to *standard-output* is correctly encoded.
+  (dribble "test-format.txt")
+  ;; Print a Greek lower-case alpha character
+  (princ #\u+3b1)
+  (dribble)
+  (with-open-file (s "test-format.txt" :direction :input)
+    (let ((c (read-char s)))
+      (assert-equal #\u+3b1 c))))



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/344b948245ca3b33154c767d6225db9ee7280ab2

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/344b948245ca3b33154c767d6225db9ee7280ab2
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/20220923/7f6b1bef/attachment-0001.html>


More information about the cmucl-cvs mailing list