diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-04 20:19:37 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-05 15:27:38 +0100 |
commit | 231295ee26c4ebe046d52a943b537c813ac9fb02 (patch) | |
tree | 75d9421d036e053f28851910d32214dcaac706c0 /tests/test-init.sh | |
parent | 65c8c0b8a2060af8af5afdf1e1ff979b7f727b01 (diff) | |
download | gnulib-231295ee26c4ebe046d52a943b537c813ac9fb02.tar.gz |
test-init.sh: accommodate Solaris 5.10's different diff -u output
* tests/test-init.sh: Also exempt @@ lines from the comparison
of diff output, since Solaris 5.10 and GNU diff formats differ.
Reported by Stefano Lattarini.
Diffstat (limited to 'tests/test-init.sh')
-rwxr-xr-x | tests/test-init.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-init.sh b/tests/test-init.sh index 123da8e77c..ee1c798a93 100755 --- a/tests/test-init.sh +++ b/tests/test-init.sh @@ -52,13 +52,15 @@ EOF compare empty in >out 2>err && fail=1 # Remove the TAB-date suffix on each --- and +++ line, # for both the expected and the actual output files. + # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ: + # -@@ -0,0 +1 @@ + # +@@ -1,0 +1,1 @@ cat <<\EOF > exp --- empty +++ in -@@ -0,0 +1 @@ +xyz EOF - sed 's/ .*//' out > k && mv k out + sed 's/ .*//;/^@@/d' out > k && mv k out compare exp out || fail=1 case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac } |