From de2269c9e718e557dd9c90289b258dafe7c4a36d Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Wed, 6 May 2020 21:00:57 +0200 Subject: [PATCH] tests: add regression test for errors in printing non-ascii symbol names Changes submitted by Vladimir Sedach to the ecl-devel mailing list. --- src/tests/normal-tests/unicode.lsp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/tests/normal-tests/unicode.lsp b/src/tests/normal-tests/unicode.lsp index a32976798..6a4bc8877 100644 --- a/src/tests/normal-tests/unicode.lsp +++ b/src/tests/normal-tests/unicode.lsp @@ -40,3 +40,30 @@ (is (equal "ДАННЫЕ" (pathname-name (pathname "/tmp/данные.txt") :case :common)))) + +;;; Date: 2020-05-03 +;;; From: Vladimir Sedach +;;; Fixed: 2020-05-03 (Vladimir Sedach) +;;; Description: +;;; +;;; Symbol names that contain Unicode are not printed correctly +;;; +(test unicode.0003.print-unicode-symbols + (is (string-equal + "АБРАКАДАБРА" + (format nil "~A" (read-from-string "абракадабра"))))) + +;;; Date: 2020-05-03 +;;; From: Vladimir Sedach +;;; Fixed: 2020-05-03 (Vladimir Sedach) +;;; Description: +;;; +;;; unicode.0003.print-unicode-symbols shows up as a compiler +;;; error for symbol names that contain char codes between 128 +;;; and 255, possibly others +;;; +(test unicode.0004.compile-unicode-symbols + (with-compiler ("unicode.0004.lsp" :load t) + "(defun unicode.0004 (x¹ y²) + (+ x¹ y²))") + (is (= 7 (unicode.0004 5 2))))