From ee3cc4016df56399ef0ec34d8bcbcc79fdf0c841 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Wed, 18 Sep 2024 14:51:33 +0200 Subject: [PATCH] Revert "Remove obsolete require_gnu_diff function" Oops, function require_gnu_diff is still needed in two places. This reverts commit 8cae4fc2213649e36e8f9a4cf21c28a82de3705c. --- tests/test-lib.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 25afa34..7fb1363 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -5,6 +5,18 @@ # in any medium, are permitted without royalty provided the copyright # notice and this notice are preserved. +# FIXME: Requires a version of diff that understands "-u". + +require_gnu_diff() { + case "`diff --version 2> /dev/null`" in + *GNU*) + ;; + *) + echo "This test requires GNU diff" >&2 + exit 77 + esac +} + require() { utility="$1" if type require_${utility} > /dev/null 2> /dev/null; then