diff options
author | Reuben Thomas <rrt@sc3d.org> | 2010-07-31 19:07:50 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2010-07-31 19:07:50 +0100 |
commit | a896b1b439a6b7ac2650d643b40b65357962d858 (patch) | |
tree | ef14b5687db503755cf86b3d51254e3fb5a95f40 /test | |
parent | 02d7f1820a2085b6e074da893332587d100f94ef (diff) | |
download | lrexlib-a896b1b439a6b7ac2650d643b40b65357962d858.tar.gz |
Fix two that use the “not beginning of line” flag (POSIX & GNU). They
erroneously had the subject “^abc”, not “abc”, so would always pass
(because the pattern “^abc” would never match). Of course, they still
pass with the flag set, but I have confirmed that they now fail with
the flag removed (whereas before they passed).
Diffstat (limited to 'test')
-rwxr-xr-x | test/gnu_sets.lua | 2 | ||||
-rwxr-xr-x | test/posix_sets.lua | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/test/gnu_sets.lua b/test/gnu_sets.lua index 8dd5833..e88fc1c 100755 --- a/test/gnu_sets.lua +++ b/test/gnu_sets.lua @@ -38,7 +38,7 @@ return { --{subj, patt, st,cf,ef}, { results } { {"abcd", ".+", 5}, { N } }, -- failing st { {"abc", "^abc"}, {"abc" } }, -- anchor - { {"^abc", "^abc", N,N,flg.NOTBOL}, { N } }, -- anchor + ef + { {"abc", "^abc", N,N,flg.not_bol}, { N } }, -- anchor + ef } end diff --git a/test/posix_sets.lua b/test/posix_sets.lua index 12ca474..b50c613 100755 --- a/test/posix_sets.lua +++ b/test/posix_sets.lua @@ -47,7 +47,7 @@ return { { {".+"}, {"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 + { {"^abc"}, {"abc",N,flg.NOTBOL}, { N } }, -- anchor + ef } end @@ -61,4 +61,3 @@ return function (libname) set_m_tfind (lib, flags), } end - |