tests: be robust to set -e.

* examples/test (run): here.
This commit is contained in:
Akim Demaille
2012-12-21 13:23:54 +01:00
parent 7be08dfbe7
commit a89a5b1442

View File

@@ -54,9 +54,9 @@ run ()
# Expected output. # Expected output.
local out_exp=$1 local out_exp=$1
shift shift
$prog "$@" - <input >out_eff
# Effective exit status. # Effective exit status.
local sta_eff=$? local sta_eff=0
$prog "$@" - <input >out_eff || sta_eff=$?
# Effective output. # Effective output.
local out_eff=`cat out_eff` local out_eff=`cat out_eff`
if test $sta_eff -eq $sta_exp; then if test $sta_eff -eq $sta_exp; then