diff options
Diffstat (limited to 'pcre')
-rw-r--r-- | pcre/CMakeLists.txt | 63 | ||||
-rw-r--r-- | pcre/ChangeLog | 2 | ||||
-rw-r--r-- | pcre/pcre_compile.c | 2 | ||||
-rw-r--r-- | pcre/pcre_grep_test.sh | 13 | ||||
-rw-r--r-- | pcre/pcre_internal.h | 2 | ||||
-rw-r--r-- | pcre/pcre_test.bat | 9 | ||||
-rw-r--r-- | pcre/pcre_test.sh | 11 |
7 files changed, 54 insertions, 48 deletions
diff --git a/pcre/CMakeLists.txt b/pcre/CMakeLists.txt index 807a8178a0f..de8951d02fe 100644 --- a/pcre/CMakeLists.txt +++ b/pcre/CMakeLists.txt @@ -372,12 +372,6 @@ IF(PCRE_BUILD_TESTS) # exes in Debug location tested by the RunTest shell script # via "make test" - IF(PCRE_BUILD_PCREGREP) - GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) - ENDIF(PCRE_BUILD_PCREGREP) - - GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) - STRING(REGEX REPLACE "[^/]+$" "" PCRETEST_DIR ${PCRETEST_EXE}) # ================================================= # Write out a CTest configuration file @@ -389,36 +383,24 @@ MESSAGE(\"When testing is complete, review test output in the MESSAGE(\" \") ") - FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh - "#! /bin/sh -# This is a generated file. -srcdir=${PROJECT_SOURCE_DIR} -pcretest=${PCRETEST_EXE} -cd ${PCRETEST_DIR} -. ${PROJECT_SOURCE_DIR}/RunTest -if test \"$?\" != \"0\"; then exit 1; fi -# End -") - IF(UNIX) - ADD_TEST(pcre_test sh ${PROJECT_BINARY_DIR}/pcre_test.sh) + ADD_TEST(NAME pcre_test + COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/pcre_test.sh + ${PROJECT_SOURCE_DIR} + $<TARGET_FILE:pcretest> + $<TARGET_FILE_DIR:pcretest> + ) ENDIF(UNIX) IF(PCRE_BUILD_PCREGREP) - FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh - "#! /bin/sh -# This is a generated file. -srcdir=${PROJECT_SOURCE_DIR} -pcregrep=${PCREGREP_EXE} -pcretest=${PCRETEST_EXE} -cd ${PCRETEST_DIR} -. ${PROJECT_SOURCE_DIR}/RunGrepTest -if test \"$?\" != \"0\"; then exit 1; fi -# End -") - IF(UNIX) - ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh) + ADD_TEST(NAME pcre_grep_test + COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/pcre_grep_test.sh + ${PROJECT_SOURCE_DIR} + $<TARGET_FILE:pcregrep> + $<TARGET_FILE:pcretest> + $<TARGET_FILE_DIR:pcretest> + ) ENDIF(UNIX) ENDIF(PCRE_BUILD_PCREGREP) @@ -426,22 +408,13 @@ if test \"$?\" != \"0\"; then exit 1; fi # Provide environment for executing the bat file version of RunTest FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc) FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin) - FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe) - - FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat - "\@REM This is a generated file. -\@echo off -setlocal -SET srcdir=\"${winsrc}\" -SET pcretest=\"${winexe}\" -if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\" -call %srcdir%\\RunTest.Bat -if errorlevel 1 exit /b 1 -echo RunTest.bat tests successfully completed -") ADD_TEST(NAME pcre_test_bat - COMMAND pcre_test.bat) + COMMAND pcre_test.bat + ${winsrc} + ${winbin} + $<TARGET_FILE:pcretest> + ) SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed") diff --git a/pcre/ChangeLog b/pcre/ChangeLog index 86acd7be68c..ed9d83207c3 100644 --- a/pcre/ChangeLog +++ b/pcre/ChangeLog @@ -1651,7 +1651,7 @@ Version 8.21 12-Dec-2011 are added as well. 3. Fix cache-flush issue on PowerPC (It is still an experimental JIT port). - PCRE_EXTRA_TABLES is not suported by JIT, and should be checked before + PCRE_EXTRA_TABLES is not supported by JIT, and should be checked before calling _pcre_jit_exec. Some extra comments are added. 4. (*MARK) settings inside atomic groups that do not contain any capturing diff --git a/pcre/pcre_compile.c b/pcre/pcre_compile.c index c5e9bd38e7e..5a9a2d38ddc 100644 --- a/pcre/pcre_compile.c +++ b/pcre/pcre_compile.c @@ -8354,7 +8354,7 @@ save_hwm_offset = cd->hwm - cd->start_workspace; /* Accumulate the length for use in the pre-compile phase. Start with the length of the BRA and KET and any extra bytes that are required at the beginning. We accumulate in a local variable to save frequent testing of -lenthptr for NULL. We cannot do this by looking at the value of code at the +lengthptr for NULL. We cannot do this by looking at the value of code at the start and end of each alternative, because compiled items are discarded during the pre-compile phase so that the work space is not exceeded. */ diff --git a/pcre/pcre_grep_test.sh b/pcre/pcre_grep_test.sh new file mode 100644 index 00000000000..7165aeeb0e2 --- /dev/null +++ b/pcre/pcre_grep_test.sh @@ -0,0 +1,13 @@ +#! /bin/sh +# +srcdir="$1" +pcregrep="$2" +pcretest="$3" +cd "$4" +shift +shift +shift +shift +. "$srcdir"/RunGrepTest +if test "$?" != "0"; then exit 1; fi +# End diff --git a/pcre/pcre_internal.h b/pcre/pcre_internal.h index 97ff55d03b3..b1e096ceb3d 100644 --- a/pcre/pcre_internal.h +++ b/pcre/pcre_internal.h @@ -2188,7 +2188,7 @@ regex. The lengths are used when searching for specific things, and also in the debugging printing of a compiled regex. We use a macro so that it can be defined close to the definitions of the opcodes themselves. -As things have been extended, some of these are no longer fixed lenths, but are +As things have been extended, some of these are no longer fixed lengths, but are minima instead. For example, the length of a single-character repeat may vary in UTF-8 mode. The code that uses this table must know about such things. */ diff --git a/pcre/pcre_test.bat b/pcre/pcre_test.bat new file mode 100644 index 00000000000..c3f8dc3d43b --- /dev/null +++ b/pcre/pcre_test.bat @@ -0,0 +1,9 @@ +@echo off +setlocal +SET srcdir="%1" +SET bindir="%1" +SET pcretest="%3" +if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest="%bindir%\%CMAKE_CONFIG_TYPE%\pcretest.exe" +call %srcdir%\RunTest.Bat +if errorlevel 1 exit /b 1 +echo RunTest.bat tests successfully completed diff --git a/pcre/pcre_test.sh b/pcre/pcre_test.sh new file mode 100644 index 00000000000..8fadc671c9a --- /dev/null +++ b/pcre/pcre_test.sh @@ -0,0 +1,11 @@ +#! /bin/sh +# +srcdir="$1" +pcretest="$2" +cd "$3" +shift +shift +shift +. "$srcdir"/RunTest +if test "$?" != "0"; then exit 1; fi +# End |