1 USING: globs globs.private io.directories io.pathnames sorting
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." "*.{,xml,txt}" glob-matches? ] unit-test
19 { t } [ "foo.{" "*.{" glob-matches? ] unit-test
20 { t } [ "foo" "[a-z]oo" glob-matches? ] unit-test
21 { f } [ "foo" "[g-z]oo" glob-matches? ] unit-test
23 { f } [ "foo" "bar" append-path "*" glob-matches? ] unit-test
24 { t } [ "foo" "bar" append-path "*" "*" append-path glob-matches? ] unit-test
25 { t } [ "foo" "bar" append-path "**/bar" glob-matches? ] unit-test
26 { t } [ "foo" "bar" append-path "**/b*" glob-matches? ] unit-test
27 { f } [ "foo" "bar" append-path "foo?bar" glob-matches? ] unit-test
28 { t } [ "foo" "bar" append-path "fo?" "bar" append-path glob-matches? ] unit-test
30 { f } [ "foo" glob-pattern? ] unit-test
31 { t } [ "fo?" glob-pattern? ] unit-test
32 { t } [ "fo*" glob-pattern? ] unit-test
33 { t } [ "fo[mno]" glob-pattern? ] unit-test
34 { t } [ "fo\\*" glob-pattern? ] unit-test
35 { t } [ "fo{o,bro}" glob-pattern? ] unit-test
37 { "a/b/c" { } } [ "a/b/c" split-glob ] unit-test
38 { "a/b" { "c*" } } [ "a/b/c*" split-glob ] unit-test
39 { "a/b" { "c*" "" } } [ "a/b/c*/" split-glob ] unit-test
40 { "/path/to" { "a?" } } [ "/path/to/a?" split-glob ] unit-test
44 { "a" "a/b" "a/b/c" "a/b/c/d" "a/b/h" "a/e" "a/e/g" }
46 "a" "a/b" "a/b/c" "a/b/c/d" "a/b/c/d/e" "a/b/c/f"
47 "a/b/g" "a/b/h" "a/b/h/e" "a/e" "a/e/f" "a/e/g"
51 "a" "a/b" "a/b/c" "a/b/c/d" "a/b/c/d/e" "a/b/c/f"
52 "a/b/g" "a/b/h" "a/b/h/e" "a/e" "a/e/f" "a/e/g"
56 { "a/b/c/d/e" "a/b/h/e" "a/e" "a/e/g/e" }
57 ! { "a/b/c/d/e" "a/b/h/e" "a/e" "a/e/g/e" }
58 ! { "a/b/c/d/e" "a/b/h/e" "a/e" "a/e/g/e" }
68 "a/b/c" make-directory
69 "a/b/c/d" make-directory
70 "a/b/c/d/e" touch-file
73 "a/b/h" make-directory
77 "a/e/g" make-directory