diff --git a/testing/check-trailing-log.py b/testing/check-trailing-log.py index 990dc34c..d2592167 100755 --- a/testing/check-trailing-log.py +++ b/testing/check-trailing-log.py @@ -132,7 +132,9 @@ def status_tested(name: str, all_text: str, defining_file: Path) -> list[str]: (rf"^\s*{re.escape(name)}\s*\|\|", " ||"), (rf"^\s*{re.escape(name)}\s+[^\n|&]*&&", " &&"), (rf"^\s*{re.escape(name)}\s*&&", " &&"), - (rf"\bif\s+\S*\s*{re.escape(name)}\b.*;\s*then", "if ... ; then"), + # The lookbehind keeps `\S*` from ending inside a longer name, so + # `if text=$(read_gateway_log ...); then` is not read as a call of `log`. + (rf"\bif\s+\S*\s*(? ; then"), # Command substitution. Found 2026-07-23 while fixing a function this # check reported clean: `total=$(count_log_pattern "$p") || { ... }` # consumes the status, but the line begins with the variable, so none