[Pcre-svn] [720] code/trunk: Fix RunGrepTest colour bug.

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [720] code/trunk: Fix RunGrepTest colour bug.
Revision: 720
          http://vcs.pcre.org/viewvc?view=rev&revision=720
Author:   ph10
Date:     2011-10-07 16:18:21 +0100 (Fri, 07 Oct 2011)


Log Message:
-----------
Fix RunGrepTest colour bug.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/RunGrepTest


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2011-10-07 11:41:05 UTC (rev 719)
+++ code/trunk/ChangeLog    2011-10-07 15:18:21 UTC (rev 720)
@@ -91,6 +91,9 @@
     creating alternatives. Such a group is treated in the same way as an 
     ordinary group without any | characters when processing (*THEN). PCRE has 
     been changed to match Perl's behaviour.
+    
+17. If a user had set PCREGREP_COLO(U)R to something other than 1:31, the
+    RunGrepTest script failed. 



Version 8.13 16-Aug-2011

Modified: code/trunk/RunGrepTest
===================================================================
--- code/trunk/RunGrepTest    2011-10-07 11:41:05 UTC (rev 719)
+++ code/trunk/RunGrepTest    2011-10-07 15:18:21 UTC (rev 720)
@@ -5,9 +5,16 @@
 # supported by pcregrep.


# Set the C locale, so that sort(1) behaves predictably.
+
LC_ALL=C
export LC_ALL

+# Remove any non-default colouring that the caller may have set.
+
+unset PCREGREP_COLOUR PCREGREP_COLOR
+
+# Set the program to be tested, and valgrind settings when requested.
+
pcregrep=`pwd`/pcregrep

valgrind=
@@ -28,12 +35,11 @@

$pcregrep -V

-cf="diff -ub"
-
# Set up a suitable "diff" command for comparison. Some systems have a diff
# that lacks a -u option. Try to deal with this; better do the test for the -b
# option as well.

+cf="diff -ub"
if diff -u /dev/null /dev/null; then
if diff -ub /dev/null /dev/null; then cf="diff -ub"; else cf="diff -u"; fi
else