diff options
author | Shmuel Zeigerman <solomuz0@gmail.com> | 2017-06-20 22:08:57 +0300 |
---|---|---|
committer | Shmuel Zeigerman <solomuz0@gmail.com> | 2017-06-20 22:08:57 +0300 |
commit | 325731b7e867c4307f3d7f83c1fcd25cb24617d9 (patch) | |
tree | d4d7abeaf5026ca6233738583fc2b5bdb9079ffd /test | |
parent | 8216ecdc093ea33979191469f7b4b4f939976359 (diff) | |
download | lrexlib-325731b7e867c4307f3d7f83c1fcd25cb24617d9.tar.gz |
Add support for PCRE2 library. (All currently available tests written for PCRE pass).
Diffstat (limited to 'test')
-rw-r--r-- | test/pcre_sets.lua | 3 | ||||
-rw-r--r-- | test/runtest.lua | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/test/pcre_sets.lua b/test/pcre_sets.lua index 15ca275..2d2c450 100644 --- a/test/pcre_sets.lua +++ b/test/pcre_sets.lua @@ -144,6 +144,7 @@ end local function set_m_dfa_exec (lib, flg) local ver = tonumber(lib.version():match("%d+%.%d+")) local NAP = ver < 8.34 and "" or "(*NO_AUTO_POSSESS)" + local flag_partial = ver < 10.0 and flg.PARTIAL or flg.PARTIAL_SOFT return { Name = "Method dfa_exec", Method = "dfa_exec", @@ -161,7 +162,7 @@ local function set_m_dfa_exec (lib, flg) { {"bc"}, {"abc",N, flg.ANCHORED}, {N } }, -- ef { { "(.)b.(d)"}, {"abcd"}, {1,{4},1} }, --[captures] { {"abc"}, {"ab"}, {N } }, - { {"abc"}, {"ab",N,flg.PARTIAL}, {1,{2},flg.ERROR_PARTIAL} }, + { {"abc"}, {"ab",N,flag_partial}, {1,{2},flg.ERROR_PARTIAL} }, { {NAP..".+"}, {string.rep("a",50),N,N,50,50}, {1, fill(50,26), 0}},-- small ovecsize } end diff --git a/test/runtest.lua b/test/runtest.lua index e1f1a40..fe7d053 100644 --- a/test/runtest.lua +++ b/test/runtest.lua @@ -61,6 +61,7 @@ local avail_tests = { gnu = { lib = "rex_gnu", "common_sets", "emacs_sets", "gnu_sets" }, oniguruma = { lib = "rex_onig", "common_sets", "oniguruma_sets", }, pcre = { lib = "rex_pcre", "common_sets", "pcre_sets", "pcre_sets2", }, + pcre2 = { lib = "rex_pcre2", "common_sets", "pcre_sets", "pcre_sets2", }, spencer = { lib = "rex_spencer", "common_sets", "posix_sets", "spencer_sets" }, tre = { lib = "rex_tre", "common_sets", "posix_sets", "spencer_sets", --[["tre_sets"]] }, } |