Fix gcc warnings from ICU wrappers.

Add optional support for marked sub-expression location information.
Add support for ${n} in format replacement text.
Fixes #2556.
Fixes #2269.
Fixes #2514.

[SVN r50370]
This commit is contained in:
John Maddock
2008-12-23 11:46:00 +00:00
parent c997a1fcc6
commit b4152cd74d
94 changed files with 1344 additions and 1068 deletions

View File

@ -116,5 +116,15 @@ void test_replace()
TEST_REGEX_REPLACE("x", literal|icase, "xx", match_default|format_all, "a", "aa");
// literals:
TEST_REGEX_REPLACE("(a(c)?)|(b)", perl, "acab", match_default|format_literal, "\\&$", "\\&$\\&$\\&$");
// Bracketed sub expressions:
TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default, "$", "...$,,,");
TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default, "${", "...${,,,");
TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default, "${2", "...${2,,,");
TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default, "${23", "...${23,,,");
TEST_REGEX_REPLACE("a+", perl, "...aaa,,,", match_default, "${d}", "...${d},,,");
TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default, "/${1}/", ".../aaa/,,,");
TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default, "/${10}/", "...//,,,");
TEST_REGEX_REPLACE("((((((((((a+))))))))))", perl, "...aaa,,,", match_default, "/${10}/", ".../aaa/,,,");
TEST_REGEX_REPLACE("(a+)", perl, "...aaa,,,", match_default, "/${1}0/", ".../aaa0/,,,");
}