From d2067db1b4c577af8c3814fabce0a284ca925920 Mon Sep 17 00:00:00 2001 From: BinaryBabel OSS Date: Fri, 12 Apr 2013 14:25:16 -0700 Subject: [PATCH] Remove redundant anchor in preprocess expression Expr patterns are anchored to the beginning by default. Specifying the carrot is undefined behavior and generates warnings on some versions, obscuring the output. --- libexec/bats-preprocess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/bats-preprocess b/libexec/bats-preprocess index 55406b4..79ad9cb 100755 --- a/libexec/bats-preprocess +++ b/libexec/bats-preprocess @@ -34,7 +34,7 @@ index=0 while IFS= read -r line; do index=$(($index + 1)) - quoted_name="$(expr "$line" : '^ *@test *\([^ ].*\) *{ *$' || true)" + quoted_name="$(expr "$line" : ' *@test *\([^ ].*\) *{ *$' || true)" if [ -n "$quoted_name" ]; then name="$(eval echo "$quoted_name")"