eval test options to allow quoted values
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 13 Mar 2021 05:58:13 +0000 (06:58 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 18 Apr 2022 09:04:29 +0000 (11:04 +0200)
Shell scripting fix for whitespace in set parameters.

t/regress.t
t/t1310-currency_-f',\K'.out [moved from t/t1310-currency_-f,\K.out with 100% similarity]
t/t1311-currency_zoom_-L6-_-f',([0-9.]{5})'_--value-length=6_--minval=1.out [moved from t/t1311-currency_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.out with 100% similarity]
t/t1320-earthquakes_-f'([.0-9]+)(?=,m)'.out [moved from t/t1320-earthquakes_-f([.0-9]+)(?=,m).out with 100% similarity]
t/t1330-pokemon_-f'(?<=\()'.out [moved from t/t1330-pokemon_-f(?<=\().out with 100% similarity]

index bde3eb42dfe0dbb30be1a5a9ea4a9b3019d6cec0..cd8bb5e440046b4928be69945e7404fdd3f59be9 100755 (executable)
@@ -40,7 +40,7 @@ do
                *' ?' ) set -- sh -c "\$0 \$@ 2>/dev/null" "$@";;
                *' ?'*) set -- sh -c "\$0 \$@ | test \$\? = ${name#* \?}" "$@";;
                *' |'*) set -- sh -c "\$0 \$@ | ${name#* |}" "$@";;
-               *)      set -- "$1" $2 $3
+               *)      eval set -- "$1" $2 $3
        esac
 
        if test -n "$regenerate"