diff options
author | shmuz <shmuz> | 2007-02-12 19:43:19 +0000 |
---|---|---|
committer | shmuz <shmuz> | 2007-02-12 19:43:19 +0000 |
commit | 6bdd36a334e3ec0fbe2b8d668297b83fda68c60d (patch) | |
tree | 5f1429a4a3ccd90b008d678f7d4186fe7de29224 /test | |
parent | aa3a33ddaea94602c6da54fe9ce44ad92377fe1a (diff) | |
download | lrexlib-6bdd36a334e3ec0fbe2b8d668297b83fda68c60d.tar.gz |
API change (error handling): see ChangeLog
Diffstat (limited to 'test')
-rwxr-xr-x | test/pcre_sets.lua | 50 | ||||
-rwxr-xr-x | test/posix_sets.lua | 28 |
2 files changed, 39 insertions, 39 deletions
diff --git a/test/pcre_sets.lua b/test/pcre_sets.lua index ea5a197..865a10f 100755 --- a/test/pcre_sets.lua +++ b/test/pcre_sets.lua @@ -30,11 +30,11 @@ local function set_f_find (lib, flg) Name = "Function find", Func = lib.find, --{subj, patt, st,cf,ef,lo}, { results } - { {"abcd", ".+", 5}, { N,flg.ERROR_NOMATCH }}, -- failing st - { {"abcd", ".*?"}, { 1,0 } }, -- non-greedy - { {"abc", "aBC", N,flg.CASELESS}, { 1,3 } }, -- cf - { {"abc", "bc", N,N,flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- cf - { {"abc", "bc", N,N,flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- ef + { {"abcd", ".+", 5}, { N } }, -- failing st + { {"abcd", ".*?"}, { 1,0 } }, -- non-greedy + { {"abc", "aBC", N,flg.CASELESS}, { 1,3 } }, -- cf + { {"abc", "bc", N,N,flg.ANCHORED}, { N } }, -- cf + { {"abc", "bc", N,N,flg.ANCHORED}, { N } }, -- ef } end @@ -43,11 +43,11 @@ local function set_f_match (lib, flg) Name = "Function match", Func = lib.match, --{subj, patt, st,cf,ef,lo}, { results } - { {"abcd", ".+", 5}, { N,flg.ERROR_NOMATCH }}, -- failing st - { {"abcd", ".*?"}, { "" } }, -- non-greedy - { {"abc", "aBC", N,flg.CASELESS}, {"abc" } }, -- cf - { {"abc", "bc", N,N,flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- cf - { {"abc", "bc", N,N,flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- ef + { {"abcd", ".+", 5}, { N }}, -- failing st + { {"abcd", ".*?"}, { "" }}, -- non-greedy + { {"abc", "aBC", N,flg.CASELESS}, {"abc" }}, -- cf + { {"abc", "bc", N,N,flg.ANCHORED}, { N }}, -- cf + { {"abc", "bc", N,N,flg.ANCHORED}, { N }}, -- ef } end @@ -56,11 +56,11 @@ local function set_m_exec (lib, flg) Name = "Method exec", Method = "exec", --{patt,cf,lo}, {subj,st,ef} { results } - { {".+"}, {"abcd",5}, { N,flg.ERROR_NOMATCH }}, -- failing st - { {".*?"}, {"abcd"}, {1,0,{}} }, -- non-greedy - { {"aBC",flg.CASELESS}, {"abc"}, {1,3,{}} }, -- cf - { {"bc",flg.ANCHORED}, {"abc"}, { N,flg.ERROR_NOMATCH }}, -- cf - { {"bc"}, {"abc",N, flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- ef + { {".+"}, {"abcd",5}, { N } }, -- failing st + { {".*?"}, {"abcd"}, {1,0,{}} }, -- non-greedy + { {"aBC",flg.CASELESS}, {"abc"}, {1,3,{}} }, -- cf + { {"bc",flg.ANCHORED}, {"abc"}, { N } }, -- cf + { {"bc"}, {"abc",N, flg.ANCHORED}, { N } }, -- ef } end @@ -69,11 +69,11 @@ local function set_m_tfind (lib, flg) Name = "Method tfind", Method = "tfind", --{patt,cf,lo}, {subj,st,ef} { results } - { {".+"}, {"abcd",5}, { N,flg.ERROR_NOMATCH }}, -- failing st - { {".*?"}, {"abcd"}, {1,0,{}} }, -- non-greedy - { {"aBC",flg.CASELESS}, {"abc"}, {1,3,{}} }, -- cf - { {"bc",flg.ANCHORED}, {"abc"}, { N,flg.ERROR_NOMATCH }}, -- cf - { {"bc"}, {"abc",N, flg.ANCHORED}, { N,flg.ERROR_NOMATCH }}, -- ef + { {".+"}, {"abcd",5}, { N } }, -- failing st + { {".*?"}, {"abcd"}, {1,0,{}} }, -- non-greedy + { {"aBC",flg.CASELESS}, {"abc"}, {1,3,{}} }, -- cf + { {"bc",flg.ANCHORED}, {"abc"}, { N } }, -- cf + { {"bc"}, {"abc",N, flg.ANCHORED}, { N } }, -- ef } end @@ -85,15 +85,15 @@ local function set_m_dfa_exec (lib, flg) { {".+"}, {"abcd"}, {1,{4,3,2,1},4} }, -- [none] { {".+"}, {"abcd",2}, {2,{4,3,2}, 3} }, -- positive st { {".+"}, {"abcd",-2}, {3,{4,3}, 2} }, -- negative st - { {".+"}, {"abcd",5}, {N,flg.ERROR_NOMATCH }}, -- failing st + { {".+"}, {"abcd",5}, {N } }, -- failing st { {".*"}, {"abcd"}, {1,{4,3,2,1,0},5}}, -- [none] { {".*?"}, {"abcd"}, {1,{4,3,2,1,0},5}}, -- non-greedy { {"aBC",flg.CASELESS}, {"abc"}, {1,{3},1} }, -- cf { {"bc"}, {"abc"}, {2,{3},1} }, -- [none] - { {"bc",flg.ANCHORED}, {"abc"}, {N,flg.ERROR_NOMATCH }}, -- cf - { {"bc"}, {"abc",N, flg.ANCHORED}, {N,flg.ERROR_NOMATCH }}, -- ef - { { "(.)b.(d)"}, {"abcd"}, {1,{4},1}}, --[captures] - { {"abc"}, {"ab"}, {N,flg.ERROR_NOMATCH }}, + { {"bc",flg.ANCHORED}, {"abc"}, {N } }, -- cf + { {"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} }, { {".+"}, {string.rep("a",50),N,N,50,50}, {1, fill(50,26), 0}},-- small ovecsize } diff --git a/test/posix_sets.lua b/test/posix_sets.lua index 961e111..12ca474 100755 --- a/test/posix_sets.lua +++ b/test/posix_sets.lua @@ -8,10 +8,10 @@ return { Name = "Function find", Func = lib.find, --{subj, patt, st,cf,ef}, { results } - { {"abcd", ".+", 5}, { N,flg.NOMATCH }}, -- failing st + { {"abcd", ".+", 5}, { N } }, -- failing st { {"abc", "aBC", N, flg.ICASE}, { 1,3 } }, -- cf { {"abc", "^abc"}, { 1,3 } }, -- anchor - { {"^abc", "^abc", N,N,flg.NOTBOL}, { N,flg.NOMATCH }}, -- anchor + ef + { {"^abc", "^abc", N,N,flg.NOTBOL}, { N } }, -- anchor + ef } end @@ -20,10 +20,10 @@ return { Name = "Function match", Func = lib.match, --{subj, patt, st,cf,ef}, { results } - { {"abcd", ".+", 5}, { N,flg.NOMATCH }}, -- failing st - { {"abc", "aBC", N, flg.ICASE}, {"abc" } }, -- cf - { {"abc", "^abc"}, {"abc" } }, -- anchor - { {"^abc", "^abc", N,N,flg.NOTBOL}, { N,flg.NOMATCH }}, -- anchor + ef + { {"abcd", ".+", 5}, { N } }, -- failing st + { {"abc", "aBC", N, flg.ICASE}, {"abc" } }, -- cf + { {"abc", "^abc"}, {"abc" } }, -- anchor + { {"^abc", "^abc", N,N,flg.NOTBOL}, { N } }, -- anchor + ef } end @@ -32,10 +32,10 @@ return { Name = "Method exec", Method = "exec", -- {patt,cf}, {subj,st,ef} { results } - { {".+"}, {"abcd",5}, { N,flg.NOMATCH }}, -- failing st - { {"aBC",flg.ICASE}, {"abc"}, {1,3,{}} }, -- cf - { {"^abc"}, {"abc"}, {1,3,{}} }, -- anchor - { {"^abc"}, {"^abc",N,flg.NOTBOL}, { N,flg.NOMATCH }}, -- anchor + ef + { {".+"}, {"abcd",5}, { N } }, -- failing st + { {"aBC",flg.ICASE}, {"abc"}, {1,3,{}} }, -- cf + { {"^abc"}, {"abc"}, {1,3,{}} }, -- anchor + { {"^abc"}, {"^abc",N,flg.NOTBOL}, { N } }, -- anchor + ef } end @@ -44,10 +44,10 @@ return { Name = "Method tfind", Method = "tfind", -- {patt,cf}, {subj,st,ef} { results } - { {".+"}, {"abcd",5}, { N,flg.NOMATCH }}, -- failing st - { {"aBC",flg.ICASE}, {"abc"}, {1,3,{}} }, -- cf - { {"^abc"}, {"abc"}, {1,3,{}} }, -- anchor - { {"^abc"}, {"^abc",N,flg.NOTBOL}, { N,flg.NOMATCH }}, -- anchor + ef + { {".+"}, {"abcd",5}, { N } }, -- failing st + { {"aBC",flg.ICASE}, {"abc"}, {1,3,{}} }, -- cf + { {"^abc"}, {"abc"}, {1,3,{}} }, -- anchor + { {"^abc"}, {"^abc",N,flg.NOTBOL}, { N } }, -- anchor + ef } end |