diff --git a/i18n/tests/norm-test.lisp b/i18n/tests/norm-test.lisp index afe97fde7493393b235cba8248a0e944bc552ebf..11fdfdd053a8b40dd20924971410838138425601 100644 --- a/i18n/tests/norm-test.lisp +++ b/i18n/tests/norm-test.lisp @@ -4,7 +4,7 @@ (in-package "CL-USER") (defvar *normalization-test* "target:i18n/tests/NormalizationTest.txt") -(defun parse-line (line) +(defun parse-norm-line (line) (declare (string line)) (cond ((or (char= (aref line 0) #\@) (char= (aref line 0) #\#)) @@ -46,7 +46,7 @@ (failures 0)) (loop for line = (read-line testfile nil nil) while line do (multiple-value-bind (c1 c2 c3 c4 c5) - (parse-line line) + (parse-norm-line line) (when c1 (incf total) (let ((test1 (lisp::string-to-nfd c1)) @@ -78,8 +78,9 @@ (let ((total 0) (failures 0)) (loop for line = (read-line testfile nil nil) while line do + ;;(format t "line = ~S~%" line) (multiple-value-bind (c1 c2 c3 c4 c5) - (parse-line line) + (parse-norm-line line) (when c1 (incf total) (let ((test1 (lisp::string-to-nfkd c1)) @@ -111,7 +112,7 @@ (failures 0)) (loop for line = (read-line testfile nil nil) while line do (multiple-value-bind (c1 c2 c3 c4 c5) - (parse-line line) + (parse-norm-line line) (when c1 (incf total) (let ((test1 (lisp::string-to-nfc c1)) @@ -144,7 +145,7 @@ (failures 0)) (loop for line = (read-line testfile nil nil) while line do (multiple-value-bind (c1 c2 c3 c4 c5) - (parse-line line) + (parse-norm-line line) (when c1 (incf total) (let ((test1 (lisp::string-to-nfkc c1)) diff --git a/i18n/tests/word-break-test.lisp b/i18n/tests/word-break-test.lisp index a1ac26a906ec81c94168a45e7626265a0729fb67..42d961a5609651654985b336cd1a6f0871ebb3ca 100644 --- a/i18n/tests/word-break-test.lisp +++ b/i18n/tests/word-break-test.lisp @@ -5,7 +5,7 @@ (defvar *word-break-test* "target:i18n/tests/WordBreakTest.txt") -(defun parse-line (line) +(defun parse-word-break-line (line) (let* ((eos (or (position #\# line) (length line)))) ;; See WordBreakTest.txt for the format of the file. Basically @@ -63,13 +63,13 @@ (let ((count 0) (failed 0)) (format t "Run WordBreakTest~%") - (with-open-file (s file :direction :input :external-format :utf8) + (with-open-file (s file :direction :input :external-format :utf) (loop for line = (read-line s nil nil) while line do (progn (multiple-value-bind (s b) - (parse-line line) + (parse-word-break-line line) (when s (incf count) (incf failed (if (do-test s b) 0 1)))))))