[Git][cmucl/cmucl][issue-139-default-external-format-utf8] Adjust issue.130 test encoding

Raymond Toy (@rtoy) gitlab at common-lisp.net
Mon Oct 31 00:41:48 UTC 2022



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


Commits:
2fed09ce by Raymond Toy at 2022-10-30T17:41:37-07:00
Adjust issue.130 test encoding

* Create the test file name using the character names so that the
  name is independent of the encoding used to read/compile the file.
* Set `unix::*filename-encoding*` to `:utf-8` so that we can encode
  the file name properly before handing to `file-author`

Not sure why this was working in merge !88, but it's not working
locally and not working in CI.  With this change, it's working locally
now.

- - - - -


1 changed file:

- tests/issues.lisp


Changes:

=====================================
tests/issues.lisp
=====================================
@@ -682,7 +682,21 @@
   ;; work and not return NIL.
   (assert-true (file-author "."))
   (assert-true (file-author "bin/build.sh"))
-  (assert-true (file-author "tests/안녕하십니까.txt")))
+  (let ((unix::*filename-encoding* :utf-8))
+    ;; Set filename encoding to utf-8 so that we can encode the
+    ;; filename properly.
+    (assert-true
+   (file-author
+    (merge-pathnames 
+     (concatenate 'string
+		  ;; Write the test file name this way so
+		  ;; that it's independent of the encoding
+		  ;; used to load this file.  The name is
+		  ;; "안녕하십니까".
+		  '(#\Hangul_Syllable_An #\Hangul_Syllable_Nyeong #\Hangul_Syllable_Ha
+		    #\Hangul_Syllable_Sib #\Hangul_Syllable_Ni #\Hangul_Syllable_Gga)
+		  ".txt")
+     *test-path*)))))
 
 (define-test issue.139-default-external-format
     (:tag :issues)



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2fed09ce4c3f8c60b077ffe5e63cb376d7f219e7

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2fed09ce4c3f8c60b077ffe5e63cb376d7f219e7
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/20221031/2cf23589/attachment-0001.html>


More information about the cmucl-cvs mailing list