upper? was copy/pasted and WRONG. found with extra/lint

db4
Doug Coleman 2008-12-07 01:36:10 -06:00
parent 6f058a30ca
commit 1e53cf6c9f
2 changed files with 13 additions and 8 deletions

View File

@ -16,3 +16,9 @@ USING: unicode.case tools.test namespaces ;
"lt" locale set
! Lithuanian casing tests
] with-scope
[ t ] [ "asdf" lower? ] unit-test
[ f ] [ "asdF" lower? ] unit-test
[ t ] [ "ASDF" upper? ] unit-test
[ f ] [ "ASDf" upper? ] unit-test

View File

@ -100,11 +100,10 @@ SYMBOL: locale ! Just casing locale, or overall?
: >case-fold ( string -- fold )
>upper >lower ;
: lower? ( string -- ? )
dup >lower = ;
: upper? ( string -- ? )
dup >lower = ;
: title? ( string -- ? )
dup >title = ;
: case-fold? ( string -- ? )
dup >case-fold = ;
: lower? ( string -- ? ) dup >lower = ;
: upper? ( string -- ? ) dup >upper = ;
: title? ( string -- ? ) dup >title = ;
: case-fold? ( string -- ? ) dup >case-fold = ;