[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.14.116-1e18d on HP-UX 11.00
From: |
Jim Meyering |
Subject: |
Re: coreutils-8.14.116-1e18d on HP-UX 11.00 |
Date: |
Thu, 05 Jan 2012 16:43:32 +0100 |
Bruno Haible wrote:
>> http://meyering.net/cu/coreutils-8.14.116-1e18d.tar.xz
>
> On HP-UX 11.00 with vendor cc:
>
> All coreutils tests pass. But 2 gnulib tests fail:
>
>
> FAIL: test-posixtm
> ==================
...
>
> FAIL: test-init.sh
> ==================
...
> + compare_ exp out
> + diff -c exp out
> + cat diff.out
> *** exp Wed Jan 4 22:28:14 2012
> --- out Wed Jan 4 22:28:14 2012
> ***************
> *** 1,4 ****
> ! --- empty
> ! +++ in
> ! @@ -0,0 +1 @@
> ! +xyz
> --- 1,6 ----
> ! *** empty
> ! --- in
> ! ***************
> ! *** 0 ****
> ! --- 1 ----
> ! + xyz
Thanks!
My test expected diff -u output.
compare may generate diff -c output or even cmp output.
This should fix it:
>From 68571c92aeffdded292b047f1ea3c25bd5f73b49 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 5 Jan 2012 16:43:04 +0100
Subject: [PATCH] test-init.sh: avoid failure on HP-UX 11.00
* tests/test-init.sh: Skip "diff -u"-comparing step when compare
resolves to diff -c or cmp. Reported by Bruno Haible.
---
ChangeLog | 6 ++++++
tests/test-init.sh | 6 +++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 10ddc0b..eb4a3a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-05 Jim Meyering <address@hidden>
+
+ test-init.sh: avoid failure on HP-UX 11.00
+ * tests/test-init.sh: Skip "diff -u"-comparing step when compare
+ resolves to diff -c or cmp. Reported by Bruno Haible.
+
2012-01-04 Jim Meyering <address@hidden>
test-init.sh: accommodate Solaris 5.10's different diff -u output
diff --git a/tests/test-init.sh b/tests/test-init.sh
index ee1c798..1ed1b79 100755
--- a/tests/test-init.sh
+++ b/tests/test-init.sh
@@ -61,7 +61,11 @@ EOF
+xyz
EOF
sed 's/ .*//;/^@@/d' out > k && mv k out
- compare exp out || fail=1
+
+ # Check the expected output only if compare is using diff -u.
+ if $(exec 2>/dev/null; diff -u out out < /dev/null); then
+ compare exp out || fail=1
+ fi
case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
}
--
1.7.8.2.334.gd4e886