From 422367f57ef7f189f67a4ae3b9a0ecf41478db78 Mon Sep 17 00:00:00 2001 From: xonix Date: Wed, 9 Feb 2022 13:31:13 +0200 Subject: [PATCH] Consider adding `--dry-run` option #29 : issues with `--resolved` : also exclude empty goals --- makesure.awk | 2 +- tests/10_define.tush | 1 - tests/11_goal_glob.tush | 1 - tests/1_goals.tush | 1 - tests/21_parsing.tush | 8 -------- tests/6_reached_if.tush | 1 - 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/makesure.awk b/makesure.awk index e2df23b..1b35a63 100755 --- a/makesure.awk +++ b/makesure.awk @@ -434,7 +434,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) { printf " %s", quote2(ArgGoals[i],1) print ":" for (i = 0; i in resolvedGoals; i++) - if (!reachedGoals[goalName=resolvedGoals[i]]) + if (!reachedGoals[goalName=resolvedGoals[i]] && !emptyGoals[goalName]) print " " quote2(goalName) } else { for (i = 0; i in resolvedGoals; i++) { diff --git a/tests/10_define.tush b/tests/10_define.tush index 32b61ac..94c377f 100644 --- a/tests/10_define.tush +++ b/tests/10_define.tush @@ -66,7 +66,6 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/10_define.sh children_reached_or_not -d | Resolved goals to reach for 'children_reached_or_not': | other_goal_2 | is_not_reached -| children_reached_or_not $ cd "$MYDIR"; ./$MAKESURE -f tests/10_define.sh test_commented_define | goal 'test_commented_define' ... diff --git a/tests/11_goal_glob.tush b/tests/11_goal_glob.tush index c736708..e176c94 100644 --- a/tests/11_goal_glob.tush +++ b/tests/11_goal_glob.tush @@ -28,7 +28,6 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh -d '11_goal_glob*.txt' | 11_goal_glob_1.txt | 11_goal_glob_3.txt | 11_goal_glob_10.txt -| '11_goal_glob*.txt' $ cd "$MYDIR"; ./$MAKESURE -f tests/11_goal_glob.sh test1 | goal '11_goal_glob_1.txt' ... diff --git a/tests/1_goals.tush b/tests/1_goals.tush index 7448d1a..69125e8 100644 --- a/tests/1_goals.tush +++ b/tests/1_goals.tush @@ -38,7 +38,6 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/1_goals.sh -d | ccc | bbb | aaa -| default $ cd "$MYDIR"; ./$MAKESURE -f tests/1_goals.sh fail | goal 'fail' ... diff --git a/tests/21_parsing.tush b/tests/21_parsing.tush index 9d6a973..03d7320 100644 --- a/tests/21_parsing.tush +++ b/tests/21_parsing.tush @@ -59,20 +59,12 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_quoting.sh -d | no_space | 'name with spaces' | $'name with \' quote' -| 'goal|a' -| 'goal;b' -| 'goal&c' -| default $ cd "$MYDIR"; bash -c "./$MAKESURE -f tests/21_parsing_quoting.sh -d default $'name with \' quote' 'goal|a'" | Resolved goals to reach for 'default' $'name with \' quote' 'goal|a': | no_space | 'name with spaces' | $'name with \' quote' -| 'goal|a' -| 'goal;b' -| 'goal&c' -| default $ cd "$MYDIR"; ./$MAKESURE -f tests/21_parsing_quoting.sh | goal 'no_space' ... diff --git a/tests/6_reached_if.tush b/tests/6_reached_if.tush index 9cd46a1..44333a9 100644 --- a/tests/6_reached_if.tush +++ b/tests/6_reached_if.tush @@ -8,7 +8,6 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if.sh $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if.sh -d | Resolved goals to reach for 'default': | aaa -| default $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if.sh --resolved bbb | Resolved goals to reach for 'bbb':