run-tests: Use appropriate (that is: none) diff options on HP-UX.
authorSascha Wilde <wilde@sha-bang.de>
Wed, 12 Apr 2006 17:53:04 +0200
changeset 2059 a4c271765415
parent 2058 7e0dd64b0718
child 2060 676f5fd84a94
run-tests: Use appropriate (that is: none) diff options on HP-UX.
tests/run-tests
--- a/tests/run-tests	Tue Apr 11 12:44:13 2006 +0200
+++ b/tests/run-tests	Wed Apr 12 17:53:04 2006 +0200
@@ -19,6 +19,16 @@
 HGMERGE=true; export HGMERGE
 HGUSER="test"; export HGUSER
 HGRCPATH=""; export HGRCPATH
+OS=`uname`
+
+case "$OS" in
+  HP-UX)
+    DIFFOPTS=
+    ;;
+  *)
+    DIFFOPTS=-u
+    ;;
+esac
 
 if [ `echo -n HG` = "-n HG" ]
 then
@@ -101,13 +111,13 @@
 	cat "$ERR"
 	fail=1
     elif [ -r "$OUTOK" ]; then
-	if diff -u "$OUTOK" "$OUT" > /dev/null; then
+	if diff $DIFFOPTS "$OUTOK" "$OUT" > /dev/null; then
 	    : no differences
 	else
 	    cp "$OUT" "$ERR"
 	    echo
 	    echo "$1 output changed:"
-	    diff -u "$OUTOK" "$ERR" || true
+	    diff $DIFFOPTS "$OUTOK" "$ERR" || true
 	    fail=1
 	fi
     fi