From: Phil Sutter Date: Wed, 3 Sep 2025 13:23:12 +0000 (+0200) Subject: tests: monitor: Fix regex collecting expected echo output X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=419338d96bdb19c10e241387c54f416c551a47c3;p=thirdparty%2Fnftables.git tests: monitor: Fix regex collecting expected echo output No input triggered this bug, but the match would accept "insert" and "replace" keywords anywhere in the line not just at the beginning as was intended. Fixes: b2506e5504fed ("tests: Merge monitor and echo test suites") Signed-off-by: Phil Sutter --- diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh index 03091d17..4cbdee58 100755 --- a/tests/monitor/run-tests.sh +++ b/tests/monitor/run-tests.sh @@ -52,7 +52,7 @@ echo_output_append() { grep '^\(add\|replace\|insert\)' $command_file >>$output_file return } - [[ "$*" =~ ^add|replace|insert ]] && echo "$*" >>$output_file + [[ "$*" =~ ^(add|replace|insert) ]] && echo "$*" >>$output_file } json_output_filter() { # (filename) # unify handle values