mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
examples: beware of shell portability issues
This completes 2d7e743802.
Some shells don't grok "local var=`cmd`" very well: they need the rhs
to be quoted.
./examples/test: 72: local: you.,: bad variable name
FAIL examples/variant.test (exit status: 2)
Reported by Étienne Renault.
* examples/test (run): Quote the values in 'local' assignments.
This commit is contained in:
@@ -69,7 +69,7 @@ run ()
|
||||
local sta_eff=0
|
||||
$prog "$@" - <input >out_eff || sta_eff=$?
|
||||
# Effective output.
|
||||
local out_eff=`cat out_eff`
|
||||
local out_eff="`cat out_eff`"
|
||||
if test $sta_eff -eq $sta_exp; then
|
||||
if test "$out_eff" = "$out_exp"; then
|
||||
echo "$me: PASS: $number"
|
||||
|
||||
Reference in New Issue
Block a user