1 USING: ascii kernel math sequences strings tools.test ;
3 { t } [ CHAR: a letter? ] unit-test
4 { f } [ CHAR: A letter? ] unit-test
5 { f } [ CHAR: a LETTER? ] unit-test
6 { t } [ CHAR: A LETTER? ] unit-test
7 { t } [ CHAR: 0 digit? ] unit-test
8 { f } [ CHAR: x digit? ] unit-test
11 0 "There are Four Upper Case characters"
12 [ LETTER? [ 1 + ] when ] each
15 { t f } [ CHAR: \s ascii? 400 ascii? ] unit-test
17 { "HELLO HOW ARE YOU?" } [ "hellO hOw arE YOU?" >upper ] unit-test
18 { "i'm good thx bai" } [ "I'm Good THX bai" >lower ] unit-test
20 { "Hello How Are You?" } [ "hEllo how ARE yOU?" >title ] unit-test
21 { { " " "Hello" " " " " " " "World" } } [ " Hello World" >words [ >string ] map ] unit-test