Skip to content

Commit

Permalink
Parameterized goals #115
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 25, 2023
1 parent 08a45ea commit acdaa43
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tests/27_parameterized_goals.tush
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,20 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_9.sh 'greet2@John@'\'
| goal $'greet2@John@\'quoted\'' [empty].

$ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_10_errors.sh -l
@ missing parameters:
@ tests/27_parameterized_goals_10_errors.sh:25: @goal f @params # zero params is invalid
@ missing parameters:
@ tests/27_parameterized_goals_10_errors.sh:28: @goal f1 @params @private # zero params is invalid
@ Goal must have a name:
@ tests/27_parameterized_goals_10_errors.sh:31: @goal @params A # goal without name
@ Goal must have a name:
@ tests/27_parameterized_goals_10_errors.sh:34: @goal @params # goal without name and zero params
@ Goal must have a name:
@ tests/27_parameterized_goals_10_errors.sh:37: @goal @params @private # goal without name and zero params
@ Goal must have a name:
@ tests/27_parameterized_goals_10_errors.sh:40: @goal @params @glob '*.txt' # goal without name
@ nothing allowed after goal name:
@ tests/27_parameterized_goals_10_errors.sh:43: @goal a7 b7 c7 @params D # wrong goal name / @params in wrong pos
@ Goal 'a' has unknown dependency 'unknown1':
@ tests/27_parameterized_goals_10_errors.sh:10: @depends_on unknown1 # err unknown dep
@ Goal 'a' has unknown dependency 'unknown2':
Expand Down
24 changes: 23 additions & 1 deletion tests/27_parameterized_goals_10_errors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,26 @@
echo "$S1 world from c"

@goal e
echo "e"
echo "e"

@goal f @params # zero params is invalid
echo "f"

@goal f1 @params @private # zero params is invalid
echo "f1"

@goal @params A # goal without name
echo "$A"

@goal @params # goal without name and zero params
echo ""

@goal @params @private # goal without name and zero params
echo ""

@goal @params @glob '*.txt' # goal without name
echo ""

@goal a7 b7 c7 @params D # wrong goal name / @params in wrong pos
echo ""

0 comments on commit acdaa43

Please sign in to comment.