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 d748796 commit a6730ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/parameterized_goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Should work as expected. `@doc` should just copy to instantiated goals.
- [ ] validate param name (regex)
- [x] handle + test w/ `@private`
- [ ] test w/ `@lib`
- [ ] test w/ `@doc`
- [x] test w/ `@doc`
- [x] handle + test w/ `@reached_if`
- [ ] test w/ `@glob` (should be covered by `@params` at pos 3 check)
- [ ] README.md
10 changes: 5 additions & 5 deletions tests/27_parameterized_goals.tush
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_1_1.sh e

$ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_2.sh -l
| Available goals:
| a
| c@hello
| a : doc a
| c@hello : doc c

$ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_2.sh -la
| Available goals:
| a
| b@hello
| c@hello
| a : doc a
| b@hello : doc b
| c@hello : doc c

$ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_2.sh -d a
| Resolved goals to reach for 'a':
Expand Down
3 changes: 3 additions & 0 deletions tests/27_parameterized_goals_2.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

@goal a
@doc 'doc a'
@depends_on b @args 'hello'

@goal b @params S @private
@doc 'doc b'
@depends_on c @args S
echo "$S world from b"

@goal c @params S1
@doc 'doc c'
echo "$S1 world from c"

0 comments on commit a6730ee

Please sign in to comment.