Add regex test cases

These come from https://bugzilla.gnome.org/show_bug.cgi?id=638894
This commit is contained in:
Matthias Clasen 2011-01-07 12:07:19 -05:00
parent f6b52322a2
commit b67d9cb7ee

View File

@ -2357,6 +2357,8 @@ main (int argc, char *argv[])
TEST_SPLIT_SIMPLE3(",\\s*", "a, b, c", "a", "b", "c"); TEST_SPLIT_SIMPLE3(",\\s*", "a, b, c", "a", "b", "c");
TEST_SPLIT_SIMPLE3("(,)\\s*", "a,b", "a", ",", "b"); TEST_SPLIT_SIMPLE3("(,)\\s*", "a,b", "a", ",", "b");
TEST_SPLIT_SIMPLE3("(,)\\s*", "a, b", "a", ",", "b"); TEST_SPLIT_SIMPLE3("(,)\\s*", "a, b", "a", ",", "b");
TEST_SPLIT_SIMPLE2("\\s", "ab c", "ab", "c");
TEST_SPLIT_SIMPLE3("\\s*", "ab c", "a", "b", "c");
/* Not matched sub-strings. */ /* Not matched sub-strings. */
TEST_SPLIT_SIMPLE2("a|(b)", "xay", "x", "y"); TEST_SPLIT_SIMPLE2("a|(b)", "xay", "x", "y");
TEST_SPLIT_SIMPLE3("a|(b)", "xby", "x", "b", "y"); TEST_SPLIT_SIMPLE3("a|(b)", "xby", "x", "b", "y");