[Pcre-svn] [339] code/trunk/RunTest: Some systems have a dif…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [339] code/trunk/RunTest: Some systems have a diff without a -u option.
Revision: 339
          http://vcs.pcre.org/viewvc?view=rev&revision=339
Author:   ph10
Date:     2008-04-13 16:14:34 +0100 (Sun, 13 Apr 2008)


Log Message:
-----------
Some systems have a diff without a -u option. Test for it.

Modified Paths:
--------------
    code/trunk/RunTest


Modified: code/trunk/RunTest
===================================================================
--- code/trunk/RunTest    2008-04-13 14:58:34 UTC (rev 338)
+++ code/trunk/RunTest    2008-04-13 15:14:34 UTC (rev 339)
@@ -1,11 +1,17 @@
 #! /bin/sh


-# Run PCRE tests
+# Run PCRE tests.

-cf="diff -u"
valgrind=
+
+# Set up a suitable "diff" command for comparison. Some systems
+# have a diff that lacks a -u option. Try to deal with this.
+
+if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
+
+# Find the test data
+
testdata=testdata
-
if [ -n "$srcdir" -a -d "$srcdir" ] ; then
testdata="$srcdir/testdata"
fi