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
1 changed file:
Changes:
| ... | ... | @@ -579,3 +579,20 @@ |
| 579 | 579 | with user-info = (unix:unix-getpwuid uid)
|
| 580 | 580 | while user-info
|
| 581 | 581 | finally (assert-false user-info)))
|
| 582 | + |
|
| 583 | +(define-test issue-139.1
|
|
| 584 | + (:tag :issues)
|
|
| 585 | + ;; Verify the value of the default external format and that system streams use :utf-8.
|
|
| 586 | + (assert-eql :utf-8 stream:*default-external-format*)
|
|
| 587 | + (assert-eql :utf-8 (stream-external-format sys:*stdin*))
|
|
| 588 | + (assert-eql :utf-8 (stream-external-format sys:*stdout*))
|
|
| 589 | + (assert-eql :utf-8 (stream-external-format sys:*stderr*))
|
|
| 590 | + (assert-eql :utf-8 (stream-external-format sys:*tty*))
|
|
| 591 | + ;; Check that printing to *standard-output* is correctly encoded.
|
|
| 592 | + (dribble "test-format.txt")
|
|
| 593 | + ;; Print a Greek lower-case alpha character
|
|
| 594 | + (princ #\u+3b1)
|
|
| 595 | + (dribble)
|
|
| 596 | + (with-open-file (s "test-format.txt" :direction :input)
|
|
| 597 | + (let ((c (read-char s)))
|
|
| 598 | + (assert-equal #\u+3b1 c)))) |