From 2303da77db3990046c8981b98eda63d22119253d Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sat, 22 Jul 2023 20:46:51 +0100 Subject: [PATCH] Skip the pipe test if GNU head is not available. --- tests/010-pipe | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/010-pipe b/tests/010-pipe index 99fbc3e..a7183f5 100644 --- a/tests/010-pipe +++ b/tests/010-pipe @@ -13,6 +13,12 @@ do fi done +# Check that it really is GNU head, and skip the test if not. +if ! echo | $HEAD -c 10 >/dev/null 2>&1; then + echo "GNU \`head' is required" + exit 2 +fi + # Don't use dd. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324308 COUNT1=100000000 #COUNT2=`$PROG -B 100000 -q /dev/zero | $HEAD -c $COUNT1 | wc -c | tr -d ' '`