]> git.saurik.com Git - bison.git/commitdiff
tests: diff -u is not portable
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 5 Oct 2012 06:54:15 +0000 (08:54 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 5 Oct 2012 06:57:29 +0000 (08:57 +0200)
Reported by Didier Godefroy
<http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>.

* tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not
work.

NEWS
tests/existing.at

diff --git a/NEWS b/NEWS
index c1ab7aa345348a3462e5c5d6b384ebfca33cc998..c8a4d3129e6376f1aef533f40f05860c4bc80da7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ GNU Bison NEWS
 
 ** Bug fixes
 
-  Bugs in the test suite have been fixed.
+  Bugs and portability issues in the test suite have been fixed.
 
   Some errors in translations have been addressed, and --help now directs
   users to the appropriate place to report them.
index 582f6b3df6f7747c2da9a0324998f392c7d35fc0..149499d4bac90965ea4d3f874334e6530d936aea 100644 (file)
@@ -35,7 +35,10 @@ dnl time comes, just use sed to drop the line numbers.  For now, as LR(1)
 dnl support is rapidly evolving, let's keep that information to be careful.
 dnl However, we don't do diffs for canonical LR(1) because the diff is huge.
 m4_pushdef([AT_LALR1_DIFF_CHECK],
-[AT_CHECK([[sed 's/^%define lr.type .*$//' input.y > input-lalr.y]])
+[dnl We need diff -u, which is not portable.
+AT_CHECK([diff -u /dev/null /dev/null || exit 77], [0], [ignore])
+
+AT_CHECK([[sed 's/^%define lr.type .*$//' input.y > input-lalr.y]])
 AT_BISON_CHECK([[--report=all input-lalr.y]], [[0]], [ignore], [ignore])
 AT_CHECK([[diff -u input-lalr.output input.output \
            | sed -n '/^@@/,$p' | sed 's/^ $//']],