From c48f68e4038107fa4f57953e0937d0344d46a09a Mon Sep 17 00:00:00 2001 From: xonix Date: Sat, 10 Dec 2022 02:05:35 +0200 Subject: [PATCH] `@reached_if` fails for more complex cases #113 : fix --- makesure.awk | 2 +- tests/6_reached_if.tush | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/makesure.awk b/makesure.awk index 6632c3a..093d532 100755 --- a/makesure.awk +++ b/makesure.awk @@ -38,7 +38,7 @@ BEGIN { function makesure() { while (getline > 0) { Lines[NR]=$0 - if ($1 ~ /^@/ && "@define" != $1) reparseCli() + if ($1 ~ /^@/ && "@define" != $1 && "@reached_if" != $1) reparseCli() if ("@options" == $1) handleOptions() else if ("@define" == $1) handleDefine() else if ("@shell" == $1) handleShell() diff --git a/tests/6_reached_if.tush b/tests/6_reached_if.tush index 7a3e64f..daa1330 100644 --- a/tests/6_reached_if.tush +++ b/tests/6_reached_if.tush @@ -13,6 +13,8 @@ $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if.sh --resolved bbb | Resolved goals to reach for 'bbb': $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if_issue_113.sh g1 +| goal 'g1' [already satisfied]. $ cd "$MYDIR"; ./$MAKESURE -f tests/6_reached_if_issue_113.sh g2 +| goal 'g2' ... | must show