[PATCH] tests: parser-test: don't ignore "compare" failure

Jim Meyering jim at meyering.net
Wed Oct 13 19:24:53 UTC 2010


FYI, this fixes bugs in parser-test that
I've just noticed.  I was surprised to see the test
passing with iwhd partially converted to bison/flex,
in spite of some differences.

>From bb9ae00fcc2c84440108054ceb0ea33bafda5cf4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Wed, 13 Oct 2010 21:22:49 +0200
Subject: [PATCH] tests: parser-test: don't ignore "compare" failure

---
 t/parser-test |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/parser-test b/t/parser-test
index 9d0a6c8..0005436 100755
--- a/t/parser-test
+++ b/t/parser-test
@@ -20,17 +20,17 @@ d= 0
 EOF

 parser '#a=="fubar"&&!($b.c.d<3)' > features 2> err || fail=1
-compare features f.exp
-compare /dev/null err
+compare features f.exp || fail=1
+compare /dev/null err || fail=1

 parser '#a == "fubar" && ! ( $b.c.d < 3)' > white-space 2> err || fail=1
-compare white-space f.exp
-compare /dev/null err
+compare white-space f.exp || fail=1
+compare /dev/null err || fail=1

 parser '$ a' > e1.out 2>&1; test $? = 1 || fail=1
 printf "could not parse '$ a'\n" > e1.exp
-compare e1.exp e1.out
+compare e1.exp e1.out || fail=1

 parser '1 = = 1' > e2.out 2>&1; test $? = 1 || fail=1
 printf "could not parse '1 = = 1'\n" > e2.exp
-compare e2.exp e2.out
+compare e2.exp e2.out || fail=1
--
1.7.3.1.104.gc752e


More information about the iwhd-devel mailing list