Skip to content

Commit

Permalink
Improvement to @goal @glob #46
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Sep 19, 2021
1 parent a562b75 commit c8d95e8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
8 changes: 4 additions & 4 deletions tests/11_goal_glob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
@depends_on 11_goal_glob_3.txt

@goal test2
@depends_on goal_name@11_goal_glob_2.txt
@depends_on goal_name@11_goal_glob_3.txt
@depends_on glob_goal_name@11_goal_glob_2.txt
@depends_on glob_goal_name@11_goal_glob_3.txt

@goal goal_name @glob 11_goal_glob*.txt
echo "goal_name ::: $ITEM :: $INDEX :: $TOTAL"
@goal glob_goal_name @glob 11_goal_glob*.txt
echo "glob_goal_name ::: $ITEM :: $INDEX :: $TOTAL"
41 changes: 26 additions & 15 deletions tests/11_goal_glob.tush
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh -l
| non-existent-glob*
| test1
| test2
| goal_name
| glob_goal_name

$ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh -la
| Available goals:
| 11_goal_glob_1.txt : test goal_glob
| 11_goal_glob_2.txt : test goal_glob
| 11_goal_glob_3.txt : test goal_glob
| 11_goal_glob_10.txt : test goal_glob
| 11_goal_glob*.txt : test goal_glob
| 11_goal_glob_1.txt : test goal_glob
| 11_goal_glob_2.txt : test goal_glob
| 11_goal_glob_3.txt : test goal_glob
| 11_goal_glob_10.txt : test goal_glob
| 11_goal_glob*.txt : test goal_glob
| non-existent-glob*
| test1
| test2
| goal_name@11_goal_glob_1.txt
| goal_name@11_goal_glob_2.txt
| goal_name@11_goal_glob_3.txt
| goal_name@11_goal_glob_10.txt
| goal_name
| glob_goal_name@11_goal_glob_1.txt
| glob_goal_name@11_goal_glob_2.txt
| glob_goal_name@11_goal_glob_3.txt
| glob_goal_name@11_goal_glob_10.txt
| glob_goal_name

$ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh -d '11_goal_glob*.txt'
| Resolved goals to reach for '11_goal_glob*.txt':
Expand All @@ -42,8 +42,19 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh test1
| goal 'test1' [empty].

$ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh test2
| goal 'goal_name@11_goal_glob_2.txt' ...
| goal_name ::: 11_goal_glob_2.txt :: 1 :: 4
| goal 'goal_name@11_goal_glob_3.txt' ...
| goal_name ::: 11_goal_glob_3.txt :: 2 :: 4
| goal 'glob_goal_name@11_goal_glob_2.txt' ...
| glob_goal_name ::: 11_goal_glob_2.txt :: 1 :: 4
| goal 'glob_goal_name@11_goal_glob_3.txt' ...
| glob_goal_name ::: 11_goal_glob_3.txt :: 2 :: 4
| goal 'test2' [empty].

$ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh glob_goal_name
| goal 'glob_goal_name@11_goal_glob_1.txt' ...
| glob_goal_name ::: 11_goal_glob_1.txt :: 0 :: 4
| goal 'glob_goal_name@11_goal_glob_2.txt' ...
| glob_goal_name ::: 11_goal_glob_2.txt :: 1 :: 4
| goal 'glob_goal_name@11_goal_glob_3.txt' ...
| glob_goal_name ::: 11_goal_glob_3.txt :: 2 :: 4
| goal 'glob_goal_name@11_goal_glob_10.txt' ...
| glob_goal_name ::: 11_goal_glob_10.txt :: 3 :: 4
| goal 'glob_goal_name' [empty].

0 comments on commit c8d95e8

Please sign in to comment.