]> gitweb.factorcode.org Git - factor.git/blob - basis/ascii/ascii-tests.factor
Reformat
[factor.git] / basis / ascii / ascii-tests.factor
1 USING: ascii kernel math sequences strings tools.test ;
2
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
9
10 { 4 } [
11     0 "There are Four Upper Case characters"
12     [ LETTER? [ 1 + ] when ] each
13 ] unit-test
14
15 { t f } [ CHAR: \s ascii? 400 ascii? ] unit-test
16
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
19
20 { "Hello How Are You?" } [ "hEllo how ARE yOU?" >title ] unit-test
21 { { " " "Hello" " " " " " " "World" } } [ " Hello   World" >words [ >string ] map ] unit-test