2009-02-06 01:42:46 -05:00
|
|
|
|
! Copyright (C) 2008, 2009 Daniel Ehrenberg.
|
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2016-03-31 09:04:37 -04:00
|
|
|
|
USING: unicode tools.test namespaces strings unicode.case
|
2009-03-18 22:04:36 -04:00
|
|
|
|
unicode.case.private ;
|
2008-01-09 18:13:26 -05:00
|
|
|
|
|
2019-07-30 03:24:08 -04:00
|
|
|
|
! FIXME: Unicode 12.1.0 capitalizes the M in I'M too on purpose
|
|
|
|
|
! Look into this
|
|
|
|
|
! { "Hello How Are You? I’m Good" }
|
|
|
|
|
! [ "hEllo how ARE yOU? I’m good" >title ] unit-test
|
|
|
|
|
|
|
|
|
|
{ "Hello How Are You?" }
|
|
|
|
|
[ "hEllo how ARE yOU?" >title ] unit-test
|
|
|
|
|
|
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
|
{ "FUSS" } [ "Fu\u0000DF" >upper ] unit-test
|
2019-07-30 03:24:08 -04:00
|
|
|
|
|
|
|
|
|
{ "\u0003C3a\u0003C2 \u0003C3\u0003C2 \u0003C3a\u0003C2" }
|
|
|
|
|
[ "\u0003A3A\u0003A3 \u0003A3\u0003A3 \u0003A3A\u0003A3" >lower ] unit-test
|
|
|
|
|
|
|
|
|
|
{ t }
|
|
|
|
|
[ "hello how are you?" lower? ] unit-test
|
|
|
|
|
|
2008-01-09 18:13:26 -05:00
|
|
|
|
[
|
2019-06-22 10:47:07 -04:00
|
|
|
|
{ f } [ locale get i-dot? ] unit-test
|
|
|
|
|
{ f } [ locale get lithuanian? ] unit-test
|
2008-01-09 18:13:26 -05:00
|
|
|
|
"tr" locale set
|
2019-06-22 10:47:07 -04:00
|
|
|
|
{ t } [ locale get i-dot? ] unit-test
|
|
|
|
|
{ f } [ locale get lithuanian? ] unit-test
|
|
|
|
|
{ "i\u000131i \u000131jj" } [ "i\u000131I\u000307 IJj" >lower ] unit-test
|
|
|
|
|
{ "I\u000307\u000131i Ijj" } [ "i\u000131I\u000307 IJj" >title ] unit-test
|
|
|
|
|
{ "I\u000307II\u000307 IJJ" } [ "i\u000131I\u000307 IJj" >upper ] unit-test
|
2008-01-09 18:13:26 -05:00
|
|
|
|
"lt" locale set
|
2019-06-22 10:47:07 -04:00
|
|
|
|
{ f } [ locale get i-dot? ] unit-test
|
|
|
|
|
{ t } [ locale get lithuanian? ] unit-test
|
|
|
|
|
{ "i\u000307\u000300" } [ 0xCC 1string nfd >lower ] unit-test
|
|
|
|
|
{ "\u00012f\u000307" } [ 0x12E 1string nfd >lower nfc ] unit-test
|
|
|
|
|
{ "I\u000300" } [ "i\u000307\u000300" >upper ] unit-test
|
2009-02-06 01:42:46 -05:00
|
|
|
|
! [ "I\u000300" ] [ "i\u000307\u000300" >title ] unit-test
|
2008-01-09 18:13:26 -05:00
|
|
|
|
] with-scope
|
2008-12-07 02:36:10 -05:00
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
|
{ t } [ "asdf" lower? ] unit-test
|
|
|
|
|
{ f } [ "asdF" lower? ] unit-test
|
2008-12-07 02:36:10 -05:00
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
|
{ t } [ "ASDF" upper? ] unit-test
|
|
|
|
|
{ f } [ "ASDf" upper? ] unit-test
|