bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] tests: be robust to set -e.


From: Akim Demaille
Subject: [PATCH 1/5] tests: be robust to set -e.
Date: Fri, 21 Dec 2012 17:11:38 +0100

* examples/test (run): here.
---
 examples/test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/test b/examples/test
index d320a28..6d2b96e 100755
--- a/examples/test
+++ b/examples/test
@@ -54,9 +54,9 @@ run ()
   # Expected output.
   local out_exp=$1
   shift
-  $prog "$@" - <input >out_eff
   # Effective exit status.
-  local sta_eff=$?
+  local sta_eff=0
+  $prog "$@" - <input >out_eff || sta_eff=$?
   # Effective output.
   local out_eff=`cat out_eff`
   if test $sta_eff -eq $sta_exp; then
-- 
1.8.0.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]