]> gitweb.factorcode.org Git - factor.git/commitdiff
Normalization tests also use simple-flat-file!
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Thu, 19 Mar 2009 03:55:02 +0000 (22:55 -0500)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Thu, 19 Mar 2009 03:55:02 +0000 (22:55 -0500)
basis/simple-flat-file/simple-flat-file.factor
basis/unicode/categories/categories-tests.factor
basis/unicode/normalize/normalize-tests.factor

index 63b2b87c7e009d106f08baa9f9315cd814d5cd63..abd1ccf76ebb1069de9d6ba87e441a15ff15caa0 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2009 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: sequences splitting kernel math.parser io.files io.encodings.ascii
+USING: sequences splitting kernel math.parser io.files io.encodings.utf8
 biassocs ascii ;
 IN: simple-flat-file
 
@@ -23,7 +23,7 @@ IN: simple-flat-file
     drop-comments [ parse-line ] map ; 
 
 : flat-file>biassoc ( filename -- biassoc )
-    ascii file-lines process-codetable-lines >biassoc ;
+    utf8 file-lines process-codetable-lines >biassoc ;
 
 : split-; ( line -- array )
     ";" split [ [ blank? ] trim ] map ;
index e16125b6423349fe0d924aa21020476410658924..1e718cf9b7c76dbac78e681771eda8e575ba24b3 100644 (file)
@@ -1,4 +1,7 @@
-USING: tools.test kernel unicode.categories words sequences unicode.syntax ;
+! Copyright (C) 2008 Daniel Ehrenberg.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test kernel unicode.categories words sequences unicode.data ;
+IN: unicode.categories.tests
 
 [ { f f t t f t t f f t } ] [ CHAR: A { 
     blank? letter? LETTER? Letter? digit? 
index f3ecb96af97dc72c1d17fd4f96b9dd22d3531a38..f774016272168f8771670543a5ec4cf822877137 100644 (file)
@@ -1,5 +1,5 @@
 USING: unicode.normalize kernel tools.test sequences
-unicode.data io.encodings.utf8 io.files splitting math.parser
+simple-flat-file io.encodings.utf8 io.files splitting math.parser
 locals math quotations assocs combinators unicode.normalize.private ;
 IN: unicode.normalize.tests
 
@@ -23,9 +23,8 @@ IN: unicode.normalize.tests
 [ "\u00d55c" ] [ "\u001112\u001161\u0011ab" nfc ] unit-test
 
 : parse-test ( -- tests )
-    "vocab:unicode/normalize/NormalizationTest.txt"
-    utf8 file-lines filter-comments
-    [ ";" split 5 head [ " " split [ hex> ] "" map-as ] map ] map ;
+    "vocab:unicode/normalize/NormalizationTest.txt" data
+    [ 5 head [ " " split [ hex> ] "" map-as ] map ] map ;
 
 :: assert= ( test spec quot -- )
     spec [