diff --git a/makesure.awk b/makesure.awk index a889fbe..130f979 100755 --- a/makesure.awk +++ b/makesure.awk @@ -221,6 +221,7 @@ function calcGlob(goalName, pattern, script, file) { GlobCnt = 0 GlobGoalName = goalName split("",GlobFiles) + gsub(/ /,"\\ ",pattern) script = MyDirScript ";for f in ./" pattern ";do test -e \"$f\" && echo \"$f\";done" while ((script | getline file)>0) { GlobCnt++ diff --git a/tests/21_parsing.tush b/tests/21_parsing.tush index df4d842..54806a2 100644 --- a/tests/21_parsing.tush +++ b/tests/21_parsing.tush @@ -4,7 +4,11 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_spaces.sh -la | 21_parsing 1.txt | 21_parsing 2.txt | 21_parsing*.txt +| g1@21_parsing 1.txt +| g1@21_parsing 2.txt +| g1 | test2 +| test3 $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_spaces.sh test2 | goal '21_parsing 2.txt' ... @@ -12,6 +16,11 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_spaces.sh test2 | 2 | goal 'test2' [empty]. +$ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_spaces.sh test3 +| goal 'g1@21_parsing 2.txt' ... +| 21_parsing 2.txt +| 2 +| goal 'test3' [empty]. $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_comments.sh -la | Available goals: diff --git a/tests/21_parsing_spaces.sh b/tests/21_parsing_spaces.sh index 80b1f61..a65dff4 100644 --- a/tests/21_parsing_spaces.sh +++ b/tests/21_parsing_spaces.sh @@ -4,5 +4,12 @@ echo "$ITEM" cat "$ITEM" +@goal g1 @glob '21_parsing ?.txt' + echo "$ITEM" + cat "$ITEM" + @goal test2 -@depends_on '21_parsing 2.txt' \ No newline at end of file +@depends_on '21_parsing 2.txt' + +@goal test3 +@depends_on 'g1@21_parsing 2.txt'