From a1a77e1fcc32e94aff477f2a98c15172b199d1e0 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 5 Oct 2012 08:54:15 +0200 Subject: [PATCH 1/1] tests: diff -u is not portable Reported by Didier Godefroy . * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not work. --- NEWS | 2 +- tests/existing.at | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c1ab7aa3..c8a4d312 100644 --- 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. 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/^ $//']], -- 2.45.2