--- code/trunk/RunGrepTest.in 2007/03/02 13:10:43 96 +++ code/trunk/RunGrepTest.in 2007/03/05 12:36:47 97 @@ -3,6 +3,10 @@ # This file is generated by configure from RunGrepTest.in. Make any changes # to that file. +# Set the C locale, so that sort(1) behaves predictably. +LC_ALL=C +export LC_ALL + echo "Testing pcregrep" ./pcregrep -V @@ -10,7 +14,7 @@ # itself. What we are checking here is the file handling and options that are # supported by pcregrep. -cf=diff +cf="diff -u" valgrind= if [ ! -d testdata ] ; then ln -s @top_srcdir@/testdata testdata @@ -19,7 +23,7 @@ while [ $# -gt 0 ] ; do case $1 in - valgrind) valgrind="valgrind -q --leak-check=no";; + valgrind) valgrind="valgrind -q --leak-check=no";; *) echo "Unknown argument $1"; exit 1;; esac shift @@ -127,19 +131,19 @@ $valgrind ./pcregrep -L 'fox' $testdata/grepinput $testdata/grepinputx >>testtry echo "---------------------------- Test 33 -----------------------------" >>testtry -$valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1 +$valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1 echo "RC=$?" >>testtry echo "---------------------------- Test 34 -----------------------------" >>testtry -$valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1 +$valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1 echo "RC=$?" >>testtry echo "---------------------------- Test 35 -----------------------------" >>testtry -$valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry +$valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry echo "RC=$?" >>testtry echo "---------------------------- Test 36 -----------------------------" >>testtry -$valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata >>testtry +$valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata | sort >>testtry echo "RC=$?" >>testtry echo "---------------------------- Test 37 -----------------------------" >>testtry @@ -197,11 +201,12 @@ $valgrind ./pcregrep --newline=crlf "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry echo "---------------------------- Test 52 ------------------------------" >>testtry -$valgrind ./pcregrep --newline=cr -F "def jkl" $testdata/grepinputx >>testtry +pattern=`printf 'def\rjkl'` +$valgrind ./pcregrep --newline=cr -F "$pattern" $testdata/grepinputx >>testtry echo "---------------------------- Test 53 ------------------------------" >>testtry -$valgrind ./pcregrep --newline=crlf -F "xxx -jkl" $testdata/grepinputx >>testtry +pattern=`printf 'xxx\r\njkl'` +$valgrind ./pcregrep --newline=crlf -F "$pattern" $testdata/grepinputx >>testtry echo "---------------------------- Test 54 ------------------------------" >>testtry $valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry @@ -215,7 +220,7 @@ if [ $no_utf8 -ne 0 ] ; then echo "Testing pcregrep UTF-8 features" - + echo "---------------------------- Test U1 ------------------------------" >testtry $valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry @@ -229,6 +234,6 @@ echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library" fi -exit 0 +exit 0 # End