summaryrefslogtreecommitdiff
path: root/test/pcre_sets.lua
diff options
context:
space:
mode:
authorshmuz <shmuz>2007-12-27 10:05:33 +0000
committershmuz <shmuz>2007-12-27 10:05:33 +0000
commitbacf46c90f1b023f96ccd41445e9c62fc43ab219 (patch)
tree24fe1e655c14aee032f442d4c814823dc8efbde6 /test/pcre_sets.lua
parentca2017d8044cb4fb1c40f80b62687c1c332c84c6 (diff)
downloadlrexlib-bacf46c90f1b023f96ccd41445e9c62fc43ab219.tar.gz
move tests with NULs in subject from common_sets.lua into other set files
Diffstat (limited to 'test/pcre_sets.lua')
-rwxr-xr-xtest/pcre_sets.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/pcre_sets.lua b/test/pcre_sets.lua
index 3e61e2e..9c19bbe 100755
--- a/test/pcre_sets.lua
+++ b/test/pcre_sets.lua
@@ -75,6 +75,7 @@ local function set_f_gmatch (lib, flg)
Name = "Function gmatch",
Func = test_gmatch,
--{ subj patt results }
+ { {"a\0c", "." }, {{"a",N},{"\0",N},{"c",N}} },--nuls in subj
{ {"", pCSV}, {{"",F}} },
{ {"12", pCSV}, {{"12",F}} },
{ {",", pCSV}, {{"", F},{F,""}} },
@@ -98,6 +99,7 @@ local function set_f_split (lib, flg)
Name = "Function split",
Func = test_split,
--{ subj patt results }
+ { {"a,\0,c", ","}, {{"a",",",N},{"\0",",",N},{"c",N,N}, } },--nuls in subj
{ {"ab", "$"}, {{"ab","",N}, {"",N,N}, } },
{ {"ab", "^|$"}, {{"", "", N}, {"ab","",N}, {"",N,N}, } },
{ {"ab45ab","(?<=ab).*?"}, {{"ab","",N}, {"45ab","",N},{"",N,N}, } },