mirror of
https://github.com/sstephenson/bats.git
synced 2024-11-17 03:32:27 +01: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:
parent
5030f53ecc
commit
d2067db1b4
|
@ -34,7 +34,7 @@ index=0
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
index=$(($index + 1))
|
index=$(($index + 1))
|
||||||
quoted_name="$(expr "$line" : '^ *@test *\([^ ].*\) *{ *$' || true)"
|
quoted_name="$(expr "$line" : ' *@test *\([^ ].*\) *{ *$' || true)"
|
||||||
|
|
||||||
if [ -n "$quoted_name" ]; then
|
if [ -n "$quoted_name" ]; then
|
||||||
name="$(eval echo "$quoted_name")"
|
name="$(eval echo "$quoted_name")"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user