tests: fix non-portable use of sed

Fixes #428, reported by Etienne Renault.

* tests/core/genltl.test: Do use \? with sed.
This commit is contained in:
Alexandre Duret-Lutz 2020-09-23 11:31:45 +02:00
parent b0730852bf
commit b43f378db5

View file

@ -24,8 +24,10 @@ set -e
# Make sure the name of each pattern is correctly output by %F.
opts=`genltl --help | sed -n '/=RANGE/{
s/^ *//
s/=RANGE\[\?,RANGE.*/=1,1/p
s/\[\?=RANGE.*/=1/p
s/=RANGE\[,RANGE.*/=1,1/p
s/=RANGE,RANGE.*/=1,1/p
s/\[=RANGE.*/=1/p
s/=RANGE.*/=1/p
}'`
res=`genltl $opts --format="--%F=%L"`
test "$opts" = "$res"