2 USING: tools.test globs ;
4 [ f ] [ "abd" "fdf" glob-matches? ] unit-test
5 [ f ] [ "fdsafas" "?" glob-matches? ] unit-test
6 [ t ] [ "fdsafas" "*as" glob-matches? ] unit-test
7 [ t ] [ "fdsafas" "*a*" glob-matches? ] unit-test
8 [ t ] [ "fdsafas" "*a?" glob-matches? ] unit-test
9 [ t ] [ "fdsafas" "*?" glob-matches? ] unit-test
10 [ f ] [ "fdsafas" "*s?" glob-matches? ] unit-test
11 [ t ] [ "a" "[abc]" glob-matches? ] unit-test
12 [ f ] [ "a" "[^abc]" glob-matches? ] unit-test
13 [ t ] [ "d" "[^abc]" glob-matches? ] unit-test
14 [ f ] [ "foo.java" "*.{xml,txt}" glob-matches? ] unit-test
15 [ t ] [ "foo.txt" "*.{xml,txt}" glob-matches? ] unit-test
16 [ t ] [ "foo.xml" "*.{xml,txt}" glob-matches? ] unit-test
17 [ f ] [ "foo." "*.{,xml,txt}" glob-matches? ] unit-test
18 [ t ] [ "foo.{" "*.{" glob-matches? ] unit-test