1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-09-29 12:38:26 +02:00

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.
This commit is contained in:
BinaryBabel OSS 2013-04-12 14:25:16 -07:00
parent 5030f53ecc
commit d2067db1b4

View File

@ -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")"