Merge branch 'master' of git://factorcode.org/git/factor
commit
62f1e88253
|
@ -30,6 +30,10 @@ M: ascii-class class-member? ( obj class -- ? )
|
|||
M: digit-class class-member? ( obj class -- ? )
|
||||
drop digit? ;
|
||||
|
||||
M: c-identifier-class class-member? ( obj class -- ? )
|
||||
drop
|
||||
{ [ digit? ] [ Letter? ] [ CHAR: _ = ] } 1|| ;
|
||||
|
||||
M: alpha-class class-member? ( obj class -- ? )
|
||||
drop alpha? ;
|
||||
|
||||
|
|
|
@ -46,6 +46,14 @@ IN: regexp-tests
|
|||
[ t ] [ "a" ".+" <regexp> matches? ] unit-test
|
||||
[ t ] [ "ab" ".+" <regexp> matches? ] unit-test
|
||||
|
||||
[ t ] [ " " "[\\s]" <regexp> matches? ] unit-test
|
||||
[ f ] [ "a" "[\\s]" <regexp> matches? ] unit-test
|
||||
[ f ] [ " " "[\\S]" <regexp> matches? ] unit-test
|
||||
[ t ] [ "a" "[\\S]" <regexp> matches? ] unit-test
|
||||
[ f ] [ " " "[\\w]" <regexp> matches? ] unit-test
|
||||
[ t ] [ "a" "[\\w]" <regexp> matches? ] unit-test
|
||||
[ t ] [ " " "[\\W]" <regexp> matches? ] unit-test
|
||||
[ f ] [ "a" "[\\W]" <regexp> matches? ] unit-test
|
||||
|
||||
[ t ] [ "" "a|b*|c+|d?" <regexp> matches? ] unit-test
|
||||
[ t ] [ "a" "a|b*|c+|d?" <regexp> matches? ] unit-test
|
||||
|
|
Loading…
Reference in New Issue