diff --git a/docs/parameterized_goals.md b/docs/parameterized_goals.md index 91fb8f7..029fc7e 100644 --- a/docs/parameterized_goals.md +++ b/docs/parameterized_goals.md @@ -119,7 +119,7 @@ Should work as expected. `@doc` should just copy to instantiated goals. - [x] all errors at once - [ ] TODOS - [ ] validate param name (regex) -- [ ] handle + test w/ `@private` +- [x] handle + test w/ `@private` - [ ] test w/ `@lib` - [ ] test w/ `@doc` - [x] handle + test w/ `@reached_if` diff --git a/makesure.awk b/makesure.awk index 35e95a6..f9ac49f 100755 --- a/makesure.awk +++ b/makesure.awk @@ -251,7 +251,7 @@ function calcGlob(goalName, pattern, script, file) { quicksort(GlobFiles,0,arrLen(GlobFiles)-1) } -function isPriv() { return "@private" == $NF } +function isPriv() { if ("@private" != $NF) return 0; NF--; return 1 } function handleGoalGlob( goalName,globAllGoal,globSingle,priv,i,pattern) { started("goal_glob") diff --git a/tests/27_parameterized_goals.tush b/tests/27_parameterized_goals.tush index 793ba7d..4858df3 100644 --- a/tests/27_parameterized_goals.tush +++ b/tests/27_parameterized_goals.tush @@ -37,7 +37,6 @@ $ 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 -| b@hello | c@hello $ cd "$MYDIR"; ./$MAKESURE -f tests/27_parameterized_goals_2.sh -la diff --git a/tests/27_parameterized_goals_2.sh b/tests/27_parameterized_goals_2.sh index e097dac..83993ff 100644 --- a/tests/27_parameterized_goals_2.sh +++ b/tests/27_parameterized_goals_2.sh @@ -2,7 +2,7 @@ @goal a @depends_on b @args 'hello' -@goal b @params S +@goal b @params S @private @depends_on c @args S echo "$S world from b"