]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unicode/collation/collation-tests.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / unicode / collation / collation-tests.factor
index add0cbe677f745932152515fd0ec212932be703c..f76e93d0661f0ba85e880db0db34ba7c99bb7803 100644 (file)
@@ -1,29 +1,29 @@
-USING: io io.files splitting grouping unicode.collation\r
-sequences kernel io.encodings.utf8 math.parser math.order\r
-tools.test assocs words ;\r
-IN: unicode.collation.tests\r
-\r
-: parse-test ( -- strings )\r
-    "vocab:unicode/collation/CollationTest_SHIFTED.txt"\r
-    utf8 file-lines 5 tail\r
-    [ ";" split1 drop " " split [ hex> ] "" map-as ] map ;\r
-\r
-: test-two ( str1 str2 -- )\r
-    [ +lt+ ] -rot [ string<=> ] 2curry unit-test ;\r
-\r
-: test-equality ( str1 str2 -- ? ? ? ? )\r
-    { primary= secondary= tertiary= quaternary= }\r
-    [ execute( a b -- ? ) ] 2with map\r
-    first4 ;\r
-\r
-[ f f f f ] [ "hello" "hi" test-equality ] unit-test\r
-[ t f f f ] [ "hello" "h\u0000e9llo" test-equality ] unit-test\r
-[ t t f f ] [ "hello" "HELLO" test-equality ] unit-test\r
-[ t t t f ] [ "hello" "h e l l o." test-equality ] unit-test\r
-[ t t t t ] [ "hello" "\0hello\0" test-equality ] unit-test\r
-[ { "good bye" "goodbye" "hello" "HELLO" } ]\r
-[ { "HELLO" "goodbye" "good bye" "hello" } sort-strings ]\r
-unit-test\r
-\r
-parse-test 2 <clumps>\r
-[ test-two ] assoc-each\r
+USING: io io.files splitting grouping unicode.collation
+sequences kernel io.encodings.utf8 math.parser math.order
+tools.test assocs words ;
+IN: unicode.collation.tests
+
+: parse-test ( -- strings )
+    "vocab:unicode/collation/CollationTest_SHIFTED.txt"
+    utf8 file-lines 5 tail
+    [ ";" split1 drop " " split [ hex> ] "" map-as ] map ;
+
+: test-two ( str1 str2 -- )
+    [ +lt+ ] -rot [ string<=> ] 2curry unit-test ;
+
+: test-equality ( str1 str2 -- ? ? ? ? )
+    { primary= secondary= tertiary= quaternary= }
+    [ execute( a b -- ? ) ] 2with map
+    first4 ;
+
+[ f f f f ] [ "hello" "hi" test-equality ] unit-test
+[ t f f f ] [ "hello" "h\u0000e9llo" test-equality ] unit-test
+[ t t f f ] [ "hello" "HELLO" test-equality ] unit-test
+[ t t t f ] [ "hello" "h e l l o." test-equality ] unit-test
+[ t t t t ] [ "hello" "\0hello\0" test-equality ] unit-test
+[ { "good bye" "goodbye" "hello" "HELLO" } ]
+[ { "HELLO" "goodbye" "good bye" "hello" } sort-strings ]
+unit-test
+
+parse-test 2 <clumps>
+[ test-two ] assoc-each