globs: fix glob for literal path.

char-rename
John Benediktsson 2016-09-16 17:41:31 -07:00
parent b0495b5fe3
commit c590ad1201
2 changed files with 7 additions and 1 deletions

View File

@ -58,6 +58,8 @@ tools.test ;
! { "a/b/c/d/e" "a/b/h/e" "a/e" "a/e/g/e" }
{ "a/e/f" "a/e/g" }
{ "a/b" "a/e" }
{ "a" }
{ "a/b" }
} [
[
@ -85,5 +87,7 @@ tools.test ;
! "**/**/e" glob natural-sort
"**/e/**" glob natural-sort
"a/**" glob natural-sort
"a" glob natural-sort
"a/b" glob natural-sort
] with-test-directory
] unit-test

View File

@ -156,4 +156,6 @@ DEFER: glob%
PRIVATE>
: glob ( glob -- files )
glob-path [ glob% ] { } make ;
glob-path [
[ 1array f swap ] when-empty glob%
] { } make ;