From 9163106cf2ebe76d36874c7b99166a43068bb4f0 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Sat, 4 Sep 2010 01:15:49 +0000
Subject: [PATCH] Merge changes from 20b branch.

---
 i18n/tests/norm-test.lisp       | 11 ++++++-----
 i18n/tests/word-break-test.lisp |  6 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/i18n/tests/norm-test.lisp b/i18n/tests/norm-test.lisp
index afe97fde7..11fdfdd05 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 a1ac26a90..42d961a56 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)))))))
-- 
GitLab