summaryrefslogtreecommitdiff
path: root/tests/existing.at
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-10-05 08:54:15 +0200
committerAkim Demaille <akim@lrde.epita.fr>2012-10-05 08:57:29 +0200
commita1a77e1fcc32e94aff477f2a98c15172b199d1e0 (patch)
tree9efd3a5d425aafdba7cf8a0e682b7c1da91e796f /tests/existing.at
parent10b009fa50359e2dd5b068f1aaa40c1497da916a (diff)
downloadbison-a1a77e1fcc32e94aff477f2a98c15172b199d1e0.tar.gz
tests: diff -u is not portable
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.
Diffstat (limited to 'tests/existing.at')
-rw-r--r--tests/existing.at5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/existing.at b/tests/existing.at
index 582f6b3d..149499d4 100644
--- a/tests/existing.at
+++ b/tests/existing.at
@@ -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/^ $//']],