Changed behaviour of \B so that it succeeds when the neither adjacent character is a word character.

[SVN r45354]
This commit is contained in:
John Maddock
2008-05-14 11:19:58 +00:00
parent 8928c7737e
commit 4c105a90a1
2 changed files with 5 additions and 2 deletions

View File

@ -109,6 +109,9 @@ void test_assertion_escapes()
TEST_REGEX_SEARCH("a\\B", perl, "ab", match_default, make_array(0, 1, -2, -2));
TEST_REGEX_SEARCH("a\\B", perl, "a", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("a\\B", perl, "a ", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("\\By\\b", perl, "xy", match_default, make_array(1, 2, -2, -2));
TEST_REGEX_SEARCH("\\by\\B", perl, "yz", match_default, make_array(0, 1, -2, -2));
TEST_REGEX_SEARCH("\\B\\*\\B", perl, " * ", match_default, make_array(1, 2, -2, -2));
// buffer operators:
TEST_REGEX_SEARCH("\\`abc", perl, "abc", match_default, make_array(0, 3, -2, -2));
TEST_REGEX_SEARCH("\\`abc", perl, "\nabc", match_default, make_array(-2, -2));