diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-05-02 10:58:35 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-05-02 10:58:35 +0000 |
commit | f928fc290573ad8fdc4e3ae8decd0a18f3cff828 (patch) | |
tree | 613844365cad5e4d4b969ac86b68533c0cf503e8 | |
parent | 4b9dcf13062cca86e30b199b45e2d98256b103a3 (diff) | |
download | pcre-f928fc290573ad8fdc4e3ae8decd0a18f3cff828.tar.gz |
Fix RunGrepTest for make distcheck (previous change added a bug).
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@160 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rwxr-xr-x | RunGrepTest | 21 |
3 files changed, 15 insertions, 13 deletions
@@ -9,8 +9,8 @@ Version 7.2 01-May-07 2. Re-jig the pcregrep tests with different newline settings in an attempt to make them independent of the local environment's newline setting. - - 3. Add code to configure.ac to remove -g from the CFLAGS default settings. + + 3. Add code to configure.ac to remove -g from the CFLAGS default settings. Version 7.1 24-Apr-07 diff --git a/Makefile.am b/Makefile.am index b34243b..e8cfc5e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -282,7 +282,8 @@ EXTRA_DIST += \ CLEANFILES += \ testsavedregex \ teststderr \ - testtry + testtry \ + testNinput # PCRE demonstration program noinst_PROGRAMS += pcredemo diff --git a/RunGrepTest b/RunGrepTest index 7fe5295..0e3bdc2 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -229,32 +229,33 @@ fi # We go to some contortions to try to ensure that the tests for the various # newline settings will work in environments where the normal newline sequence -# is not \n. Note the messy fudge to get printf to write a string that starts -# with a hyphen. +# is not \n. Do not use exported files, whose line endings might be changed. +# Instead, create an input file using printf so that its contents are exactly +# what we want. Note the messy fudge to get printf to write a string that +# starts with a hyphen. echo "Testing pcregrep newline settings" - -printf "abc\rdef\r\nghi\njkl" >$srcdir/testNinput +printf "abc\rdef\r\nghi\njkl" >testNinput printf "%c--------------------------- Test N1 ------------------------------\r\n" - >testtry -(cd $srcdir; $valgrind $pcregrep -n -N CR "^(abc|def|ghi|jkl)" testNinput) >>testtry +$valgrind $pcregrep -n -N CR "^(abc|def|ghi|jkl)" testNinput >>testtry printf "%c--------------------------- Test N2 ------------------------------\r\n" - >>testtry -(cd $srcdir; $valgrind $pcregrep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinput) >>testtry +$valgrind $pcregrep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinput >>testtry printf "%c--------------------------- Test N3 ------------------------------\r\n" - >>testtry pattern=`printf 'def\rjkl'` -(cd $srcdir; $valgrind $pcregrep -n --newline=cr -F "$pattern" testNinput) >>testtry +$valgrind $pcregrep -n --newline=cr -F "$pattern" testNinput >>testtry printf "%c--------------------------- Test N4 ------------------------------\r\n" - >>testtry pattern=`printf 'xxx\r\njkl'` -(cd $srcdir; $valgrind $pcregrep -n --newline=crlf -F "$pattern" testNinput) >>testtry +$valgrind $pcregrep -n --newline=crlf -F "$pattern" testNinput >>testtry printf "%c--------------------------- Test N5 ------------------------------\r\n" - >>testtry -(cd $srcdir; $valgrind $pcregrep -n --newline=any "^(abc|def|ghi|jkl)" testNinput) >>testtry +$valgrind $pcregrep -n --newline=any "^(abc|def|ghi|jkl)" testNinput >>testtry printf "%c--------------------------- Test N6 ------------------------------\r\n" - >>testtry -(cd $srcdir; $valgrind $pcregrep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinput) >>testtry +$valgrind $pcregrep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinput >>testtry $cf $srcdir/testdata/grepoutputN testtry if [ $? != 0 ] ; then exit 1; fi |