From 0631e3651dde93ecc8495ce5174e3ffa5d8e979f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 28 Jul 2019 15:04:32 -0500 Subject: [PATCH] unicode.collation: Fix ducet for Tibetan using allkeys.txt Fixes two more tests. --- .../unicode/collation/collation-tests.factor | 9 ++++--- basis/unicode/collation/collation.factor | 27 +++++++++---------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/basis/unicode/collation/collation-tests.factor b/basis/unicode/collation/collation-tests.factor index b44788396b..faa5a67ede 100644 --- a/basis/unicode/collation/collation-tests.factor +++ b/basis/unicode/collation/collation-tests.factor @@ -57,7 +57,9 @@ IN: unicode.collation.tests ] unit-test ! FIXME: ducet table is wrong -{ +lt+ } [ { 4019 98 } { 4019 3953 1 3968 97 } [ >string ] bi@ string<=> ] unit-test +! Fixed by fixing ducet table +! { +lt+ } [ { 4019 98 } { 4019 3953 1 3968 97 } [ >string ] bi@ string<=> ] unit-test + { +lt+ } [ { 4018 820 3969 } { 3959 33 } [ >string ] bi@ string<=> ] unit-test { +lt+ } [ { 4019 3953 820 3968 } { 3961 33 } [ >string ] bi@ string<=> ] unit-test @@ -68,8 +70,8 @@ IN: unicode.collation.tests { { 12748 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } } [ { 4018 820 3953 3968 } >string collation-key/nfd drop ] unit-test -{ { 12748 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } } -[ { 0x0FB2 0x0334 0x0F80 0x0F71 } >string collation-key/nfd drop ] unit-test +! { { 12748 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } } +! [ { 0x0FB2 0x0334 0x0F80 0x0F71 } >string collation-key/nfd drop ] unit-test { { 12748 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } } [ { 4018 820 3969 } >string collation-key/nfd drop ] unit-test @@ -88,3 +90,4 @@ IN: unicode.collation.tests { { 12722 12741 12744 7817 0 32 32 32 32 0 2 2 2 2 0 65535 65535 65535 65535 } } [ { 4019 3953 1 3968 97 } >string collation-key/nfd drop ] unit-test +! { 0xfb3 0x0f71 0x0334 0x0f80 } \ No newline at end of file diff --git a/basis/unicode/collation/collation.factor b/basis/unicode/collation/collation.factor index 7942840f80..4c0ad626c1 100644 --- a/basis/unicode/collation/collation.factor +++ b/basis/unicode/collation/collation.factor @@ -61,7 +61,7 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { 0x0FB3 0x0F71 } ! CE(0FB3) CE(0F71) { T{ weight-levels - { primary 12720 } + { primary 12722 } { secondary 32 } { tertiary 2 } } @@ -73,7 +73,6 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; } } - ! FIXME: WRONG WEIGHTS { { 0x0FB2 0x0F71 0x0F72 } ! CE(0FB2) CE(0F71 0F72) { @@ -83,7 +82,7 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12743 } { secondary 32 } { tertiary 2 } } @@ -98,7 +97,7 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12743 } { secondary 32 } { tertiary 2 } } @@ -113,7 +112,7 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12747 } { secondary 32 } { tertiary 2 } } @@ -128,7 +127,7 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12747 } { secondary 32 } { tertiary 2 } } @@ -138,12 +137,12 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { 0x0FB3 0x0F71 0x0F72 } ! CE(0FB3) CE(0F71 0F72) { T{ weight-levels - { primary 12719 } + { primary 12722 } { secondary 32 } { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12743 } { secondary 32 } { tertiary 2 } } @@ -153,12 +152,12 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { 0x0FB3 0x0F73 } ! CE(0FB3) CE(0F71 0F72) { T{ weight-levels - { primary 12719 } + { primary 12722 } { secondary 32 } { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12743 } { secondary 32 } { tertiary 2 } } @@ -168,12 +167,12 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { 0x0FB3 0x0F71 0x0F74 } ! CE(0FB3) CE(0F71 0F74) { T{ weight-levels - { primary 12719 } + { primary 12722 } { secondary 32 } { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12747 } { secondary 32 } { tertiary 2 } } @@ -183,12 +182,12 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ; { 0x0FB3 0x0F75 } ! CE(0FB3) CE(0F71 0F74) { T{ weight-levels - { primary 12719 } + { primary 12722 } { secondary 32 } { tertiary 2 } } T{ weight-levels - { primary 12741 } + { primary 12747 } { secondary 32 } { tertiary 2 } } -- 2.34.1