• Home
  • Raw
  • Download

Lines Matching full:regex

69   GRegex *regex;  in test_new()  local
72 regex = g_regex_new (data->pattern, data->compile_opts, data->match_opts, &error); in test_new()
73 g_assert (regex != NULL); in test_new()
75 g_assert_cmpstr (data->pattern, ==, g_regex_get_pattern (regex)); in test_new()
79 g_assert_cmphex (g_regex_get_compile_flags (regex), ==, data->real_compile_opts); in test_new()
80 g_assert_cmphex (g_regex_get_match_flags (regex), ==, data->real_match_opts); in test_new()
83 g_regex_unref (regex); in test_new()
95 path = g_strdup_printf ("/regex/new/%d", ++total); \
111 path = g_strdup_printf ("/regex/new-check-flags/%d", ++total); \
120 GRegex *regex; in test_new_fail() local
123 regex = g_regex_new (data->pattern, data->compile_opts, data->match_opts, &error); in test_new_fail()
125 g_assert (regex == NULL); in test_new_fail()
138 path = g_strdup_printf ("/regex/new-fail/%d", ++total); \
173 path = g_strdup_printf ("/regex/match-%s/%d", _name, ++total); \
189 GRegex *regex; in test_match() local
193 regex = g_regex_new (data->pattern, data->compile_opts, data->match_opts, &error); in test_match()
194 g_assert (regex != NULL); in test_match()
197 match = g_regex_match_full (regex, data->string, data->string_len, in test_match()
203 g_error ("Regex '%s' (with compile options %u and " in test_match()
217 g_error ("Regex '%s' (with compile options %u and " in test_match()
229 match = g_regex_match (regex, data->string, data->match_opts2, NULL); in test_match()
233 g_regex_unref (regex); in test_match()
249 path = g_strdup_printf ("/regex/match/%d", ++total); \
283 GRegex *regex; in test_match_next() local
288 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_match_next()
290 g_assert (regex != NULL); in test_match_next()
292 g_regex_match_full (regex, data->string, data->string_len, in test_match_next()
305 g_assert (regex == g_match_info_get_regex (match_info)); in test_match_next()
327 g_regex_unref (regex); in test_match_next()
349 path = g_strdup_printf ("/regex/match/next0/%d", ++total); \
369 path = g_strdup_printf ("/regex/match/next1/%d", ++total); \
394 path = g_strdup_printf ("/regex/match/next2/%d", ++total); \
424 path = g_strdup_printf ("/regex/match/next3/%d", ++total); \
459 path = g_strdup_printf ("/regex/match/next4/%d", ++total); \
476 GRegex *regex; in test_match_count() local
480 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_match_count()
482 g_assert (regex != NULL); in test_match_count()
484 g_regex_match_full (regex, data->string, -1, data->start_position, in test_match_count()
493 g_regex_unref (regex); in test_match_count()
505 path = g_strdup_printf ("/regex/match/count/%d", ++total); \
514 GRegex *regex; in test_partial() local
517 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_partial()
519 g_assert (regex != NULL); in test_partial()
521 g_regex_match (regex, data->string, data->match_opts, &match_info); in test_partial()
532 g_regex_unref (regex); in test_partial()
543 path = g_strdup_printf ("/regex/match/partial/%d", ++total); \
564 GRegex *regex; in test_sub_pattern() local
569 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_sub_pattern()
571 g_assert (regex != NULL); in test_sub_pattern()
573 g_regex_match_full (regex, data->string, -1, data->start_position, 0, &match_info, NULL); in test_sub_pattern()
584 g_regex_unref (regex); in test_sub_pattern()
599 path = g_strdup_printf ("/regex/match/subpattern/%d", ++total); \
619 GRegex *regex; in test_named_sub_pattern() local
624 regex = g_regex_new (data->pattern, data->flags, 0, NULL); in test_named_sub_pattern()
626 g_assert (regex != NULL); in test_named_sub_pattern()
628 g_regex_match_full (regex, data->string, -1, data->start_position, 0, &match_info, NULL); in test_named_sub_pattern()
638 g_regex_unref (regex); in test_named_sub_pattern()
654 path = g_strdup_printf ("/regex/match/named/subpattern/%d", ++total); \
672 path = g_strdup_printf ("/regex/match/subpattern/named/dupnames/%d", ++total); \
689 GRegex *regex; in test_fetch_all() local
696 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_fetch_all()
698 g_assert (regex != NULL); in test_fetch_all()
700 g_regex_match (regex, data->string, 0, &match_info); in test_fetch_all()
717 g_regex_unref (regex); in test_fetch_all()
737 path = g_strdup_printf ("/regex/fetch-all0/%d", ++total); \
749 path = g_strdup_printf ("/regex/fetch-all1/%d", ++total); \
762 path = g_strdup_printf ("/regex/fetch-all2/%d", ++total); \
776 path = g_strdup_printf ("/regex/fetch-all3/%d", ++total); \
815 path = g_strdup_printf ("/regex/split/simple0/%d", ++total); \
827 path = g_strdup_printf ("/regex/split/simple1/%d", ++total); \
840 path = g_strdup_printf ("/regex/split/simple2/%d", ++total); \
854 path = g_strdup_printf ("/regex/split/simple3/%d", ++total); \
863 GRegex *regex; in test_split_full() local
869 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_split_full()
871 g_assert (regex != NULL); in test_split_full()
873 tokens = g_regex_split_full (regex, data->string, -1, data->start_position, in test_split_full()
889 g_regex_unref (regex); in test_split_full()
897 GRegex *regex; in test_split() local
903 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_split()
905 g_assert (regex != NULL); in test_split()
907 tokens = g_regex_split (regex, data->string, 0); in test_split()
922 g_regex_unref (regex); in test_split()
936 path = g_strdup_printf ("/regex/split0/%d", ++total); \
940 path = g_strdup_printf ("/regex/full-split0/%d", ++total); \
956 path = g_strdup_printf ("/regex/split1/%d", ++total); \
960 path = g_strdup_printf ("/regex/full-split1/%d", ++total); \
977 path = g_strdup_printf ("/regex/split2/%d", ++total); \
981 path = g_strdup_printf ("/regex/full-split2/%d", ++total); \
999 path = g_strdup_printf ("/regex/split3/%d", ++total); \
1003 path = g_strdup_printf ("/regex/full-split3/%d", ++total); \
1035 path = g_strdup_printf ("/regex/check-repacement/%d", ++total); \
1052 GRegex *regex = NULL; in test_expand() local
1059 regex = g_regex_new (data->pattern, data->raw ? G_REGEX_RAW : 0, 0, in test_expand()
1062 g_regex_match (regex, data->string, 0, &match_info); in test_expand()
1069 if (regex) in test_expand()
1070 g_regex_unref (regex); in test_expand()
1082 path = g_strdup_printf ("/regex/expand/%d", ++total); \
1099 GRegex *regex; in test_replace() local
1102 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_replace()
1103 res = g_regex_replace (regex, data->string, -1, data->start_position, data->replacement, 0, NULL); in test_replace()
1108 g_regex_unref (regex); in test_replace()
1120 path = g_strdup_printf ("/regex/replace/%d", ++total); \
1129 GRegex *regex; in test_replace_lit() local
1132 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_replace_lit()
1133 res = g_regex_replace_literal (regex, data->string, -1, data->start_position, in test_replace_lit()
1138 g_regex_unref (regex); in test_replace_lit()
1150 path = g_strdup_printf ("/regex/replace-literally/%d", ++total); \
1165 GRegex *regex; in test_get_string_number() local
1168 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_get_string_number()
1169 num = g_regex_get_string_number (regex, data->name); in test_get_string_number()
1172 g_regex_unref (regex); in test_get_string_number()
1182 path = g_strdup_printf ("/regex/string-number/%d", ++total); \
1213 path = g_strdup_printf ("/regex/escape/%d", ++total); \
1238 path = g_strdup_printf ("/regex/escape_nul/%d", ++total); \
1255 GRegex *regex; in test_match_all_full() local
1262 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_match_all_full()
1263 match_ok = g_regex_match_all_full (regex, data->string, data->string_len, data->start_position, in test_match_all_full()
1294 g_regex_unref (regex); in test_match_all_full()
1301 GRegex *regex; in test_match_all() local
1307 regex = g_regex_new (data->pattern, 0, 0, NULL); in test_match_all()
1308 match_ok = g_regex_match_all (regex, data->string, 0, &match_info); in test_match_all()
1320 g_message ("regex: %s", data->pattern); in test_match_all()
1370 g_regex_unref (regex); in test_match_all()
1392 path = g_strdup_printf ("/regex/match-all0/%d", ++total); \
1396 path = g_strdup_printf ("/regex/match-all-full0/%d", ++total); \
1418 path = g_strdup_printf ("/regex/match-all1/%d", ++total); \
1422 path = g_strdup_printf ("/regex/match-all-full1/%d", ++total); \
1449 path = g_strdup_printf ("/regex/match-all2/%d", ++total); \
1453 path = g_strdup_printf ("/regex/match-all-full2/%d", ++total); \
1485 path = g_strdup_printf ("/regex/match-all3/%d", ++total); \
1489 path = g_strdup_printf ("/regex/match-all-full3/%d", ++total); \
1497 GRegex *regex; in test_properties() local
1504 regex = g_regex_new ("\\p{L}\\p{Ll}\\p{Lu}\\p{L&}\\p{N}\\p{Nd}", G_REGEX_OPTIMIZE, 0, &error); in test_properties()
1505 res = g_regex_match (regex, "ppPP01", 0, &match); in test_properties()
1512 g_regex_unref (regex); in test_properties()
1518 GRegex *regex; in test_class() local
1525 regex = g_regex_new ("[abc\\x{0B1E}\\p{Mn}\\x{0391}-\\x{03A9}]", G_REGEX_OPTIMIZE, 0, &error); in test_class()
1526 res = g_regex_match (regex, "a:b:\340\254\236:\333\253:\316\240", 0, &match); in test_class()
1556 g_regex_unref (regex); in test_class()
1563 GRegex *regex; in test_lookahead() local
1571 regex = g_regex_new ("\\w+(?=;)", G_REGEX_OPTIMIZE, 0, &error); in test_lookahead()
1572 g_assert (regex); in test_lookahead()
1574 res = g_regex_match (regex, "word1 word2: word3;", 0, &match); in test_lookahead()
1582 g_regex_unref (regex); in test_lookahead()
1585 regex = g_regex_new ("foo(?!bar)", G_REGEX_OPTIMIZE, 0, &error); in test_lookahead()
1586 g_assert (regex); in test_lookahead()
1588 res = g_regex_match (regex, "foobar foobaz", 0, &match); in test_lookahead()
1597 g_regex_unref (regex); in test_lookahead()
1600 regex = g_regex_new ("(?!bar)foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookahead()
1601 g_assert (regex); in test_lookahead()
1603 res = g_regex_match (regex, "foobar foobaz", 0, &match); in test_lookahead()
1619 g_regex_unref (regex); in test_lookahead()
1626 GRegex *regex; in test_lookbehind() local
1633 regex = g_regex_new ("(?<!foo)bar", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1634 g_assert (regex); in test_lookbehind()
1636 res = g_regex_match (regex, "foobar boobar", 0, &match); in test_lookbehind()
1645 g_regex_unref (regex); in test_lookbehind()
1648 regex = g_regex_new ("(?<=bullock|donkey) poo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1649 g_assert (regex); in test_lookbehind()
1651 res = g_regex_match (regex, "don poo, and bullock poo", 0, &match); in test_lookbehind()
1659 g_regex_unref (regex); in test_lookbehind()
1661 regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1662 g_assert (regex == NULL); in test_lookbehind()
1666 regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1667 g_assert (regex == NULL); in test_lookbehind()
1671 regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1672 g_assert (regex); in test_lookbehind()
1674 res = g_regex_match (regex, "abfoo, abdfoo, abcfoo", 0, &match); in test_lookbehind()
1681 g_regex_unref (regex); in test_lookbehind()
1683 regex = g_regex_new ("^.*+(?<=abcd)", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1684 g_assert (regex); in test_lookbehind()
1686 res = g_regex_match (regex, "abcabcabcabcabcabcabcabcabcd", 0, &match); in test_lookbehind()
1690 g_regex_unref (regex); in test_lookbehind()
1692 regex = g_regex_new ("(?<=\\d{3})(?<!999)foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1693 g_assert (regex); in test_lookbehind()
1695 res = g_regex_match (regex, "999foo 123abcfoo 123foo", 0, &match); in test_lookbehind()
1702 g_regex_unref (regex); in test_lookbehind()
1704 regex = g_regex_new ("(?<=\\d{3}...)(?<!999)foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1705 g_assert (regex); in test_lookbehind()
1707 res = g_regex_match (regex, "999foo 123abcfoo 123foo", 0, &match); in test_lookbehind()
1714 g_regex_unref (regex); in test_lookbehind()
1716 regex = g_regex_new ("(?<=\\d{3}(?!999)...)foo", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1717 g_assert (regex); in test_lookbehind()
1719 res = g_regex_match (regex, "999foo 123abcfoo 123foo", 0, &match); in test_lookbehind()
1726 g_regex_unref (regex); in test_lookbehind()
1728 regex = g_regex_new ("(?<=(?<!foo)bar)baz", G_REGEX_OPTIMIZE, 0, &error); in test_lookbehind()
1729 g_assert (regex); in test_lookbehind()
1731 res = g_regex_match (regex, "foobarbaz barfoobaz barbarbaz", 0, &match); in test_lookbehind()
1738 g_regex_unref (regex); in test_lookbehind()
1745 GRegex *regex; in test_subpattern() local
1753 regex = g_regex_new ("cat(aract|erpillar|)", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1754 g_assert (regex); in test_subpattern()
1756 g_assert_cmpint (g_regex_get_capture_count (regex), ==, 1); in test_subpattern()
1757 g_assert_cmpint (g_regex_get_max_backref (regex), ==, 0); in test_subpattern()
1758 res = g_regex_match_all (regex, "caterpillar", 0, &match); in test_subpattern()
1769 g_regex_unref (regex); in test_subpattern()
1771 regex = g_regex_new ("the ((red|white) (king|queen))", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1772 g_assert (regex); in test_subpattern()
1774 g_assert_cmpint (g_regex_get_capture_count (regex), ==, 3); in test_subpattern()
1775 g_assert_cmpint (g_regex_get_max_backref (regex), ==, 0); in test_subpattern()
1776 res = g_regex_match (regex, "the red king", 0, &match); in test_subpattern()
1793 g_regex_unref (regex); in test_subpattern()
1795 regex = g_regex_new ("the ((?:red|white) (king|queen))", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1796 g_assert (regex); in test_subpattern()
1798 res = g_regex_match (regex, "the white queen", 0, &match); in test_subpattern()
1802 g_assert_cmpint (g_regex_get_max_backref (regex), ==, 0); in test_subpattern()
1813 g_regex_unref (regex); in test_subpattern()
1815 regex = g_regex_new ("(?|(Sat)(ur)|(Sun))day (morning|afternoon)", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1816 g_assert (regex); in test_subpattern()
1818 g_assert_cmpint (g_regex_get_capture_count (regex), ==, 3); in test_subpattern()
1819 res = g_regex_match (regex, "Saturday morning", 0, &match); in test_subpattern()
1833 g_regex_unref (regex); in test_subpattern()
1835 regex = g_regex_new ("(?|(abc)|(def))\\1", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1836 g_assert (regex); in test_subpattern()
1838 g_assert_cmpint (g_regex_get_max_backref (regex), ==, 1); in test_subpattern()
1839 res = g_regex_match (regex, "abcabc abcdef defabc defdef", 0, &match); in test_subpattern()
1851 g_regex_unref (regex); in test_subpattern()
1853 regex = g_regex_new ("(?|(abc)|(def))(?1)", G_REGEX_OPTIMIZE, 0, &error); in test_subpattern()
1854 g_assert (regex); in test_subpattern()
1856 res = g_regex_match (regex, "abcabc abcdef defabc defdef", 0, &match); in test_subpattern()
1868 g_regex_unref (regex); in test_subpattern()
1870regex = g_regex_new ("(?<DN>Mon|Fri|Sun)(?:day)?|(?<DN>Tue)(?:sday)?|(?<DN>Wed)(?:nesday)?|(?<DN>T… in test_subpattern()
1871 g_assert (regex); in test_subpattern()
1873 res = g_regex_match (regex, "Mon Tuesday Wed Saturday", 0, &match); in test_subpattern()
1895 g_regex_unref (regex); in test_subpattern()
1897 regex = g_regex_new ("^(a|b\\1)+$", G_REGEX_OPTIMIZE|G_REGEX_DUPNAMES, 0, &error); in test_subpattern()
1898 g_assert (regex); in test_subpattern()
1900 res = g_regex_match (regex, "aaaaaaaaaaaaaaaa", 0, &match); in test_subpattern()
1904 res = g_regex_match (regex, "ababbaa", 0, &match); in test_subpattern()
1908 g_regex_unref (regex); in test_subpattern()
1915 GRegex *regex; in test_condition() local
1921 regex = g_regex_new ("^(a+)(\\()?[^()]+(?(-1)\\))(b+)$", G_REGEX_OPTIMIZE, 0, &error); in test_condition()
1922 g_assert (regex); in test_condition()
1924 res = g_regex_match (regex, "a(zzzzzz)b", 0, &match); in test_condition()
1928 res = g_regex_match (regex, "aaazzzzzzbbb", 0, &match); in test_condition()
1932 g_regex_unref (regex); in test_condition()
1935 regex = g_regex_new ("^(a+)(?<OPEN>\\()?[^()]+(?(<OPEN>)\\))(b+)$", G_REGEX_OPTIMIZE, 0, &error); in test_condition()
1936 g_assert (regex); in test_condition()
1938 res = g_regex_match (regex, "a(zzzzzz)b", 0, &match); in test_condition()
1942 res = g_regex_match (regex, "aaazzzzzzbbb", 0, &match); in test_condition()
1946 g_regex_unref (regex); in test_condition()
1948 regex = g_regex_new ("^(a+)(?(+1)\\[|\\<)?[^()]+(\\])?(b+)$", G_REGEX_OPTIMIZE, 0, &error); in test_condition()
1949 g_assert (regex); in test_condition()
1951 res = g_regex_match (regex, "a[zzzzzz]b", 0, &match); in test_condition()
1955 res = g_regex_match (regex, "aaa<zzzzzzbbb", 0, &match); in test_condition()
1959 g_regex_unref (regex); in test_condition()
1961 regex = g_regex_new ("(?(DEFINE) (?<byte> 2[0-4]\\d | 25[0-5] | 1\\d\\d | [1-9]?\\d) )" in test_condition()
1964 g_assert (regex); in test_condition()
1966 res = g_regex_match (regex, "128.0.0.1", 0, &match); in test_condition()
1970 res = g_regex_match (regex, "192.168.1.1", 0, &match); in test_condition()
1974 res = g_regex_match (regex, "209.132.180.167", 0, &match); in test_condition()
1978 g_regex_unref (regex); in test_condition()
1980 regex = g_regex_new ("^(?(?=[^a-z]*[a-z])" in test_condition()
1983 g_assert (regex); in test_condition()
1985 res = g_regex_match (regex, "01-abc-24", 0, &match); in test_condition()
1989 res = g_regex_match (regex, "01-23-45", 0, &match); in test_condition()
1993 res = g_regex_match (regex, "01-uv-45", 0, &match); in test_condition()
1997 res = g_regex_match (regex, "01-234-45", 0, &match); in test_condition()
2001 g_regex_unref (regex); in test_condition()
2008 GRegex *regex; in test_recursion() local
2015 regex = g_regex_new ("\\( ( [^()]++ | (?R) )* \\)", G_REGEX_OPTIMIZE|G_REGEX_EXTENDED, 0, &error); in test_recursion()
2016 g_assert (regex); in test_recursion()
2018 res = g_regex_match (regex, "(middle)", 0, &match); in test_recursion()
2022 res = g_regex_match (regex, "((((((((((((((((middle))))))))))))))))", 0, &match); in test_recursion()
2026 res = g_regex_match (regex, "(((xxx(((", 0, &match); in test_recursion()
2030 g_regex_unref (regex); in test_recursion()
2032regex = g_regex_new ("^( \\( ( [^()]++ | (?1) )* \\) )$", G_REGEX_OPTIMIZE|G_REGEX_EXTENDED, 0, &e… in test_recursion()
2033 g_assert (regex); in test_recursion()
2035 res = g_regex_match (regex, "((((((((((((((((middle))))))))))))))))", 0, &match); in test_recursion()
2039 res = g_regex_match (regex, "(((xxx((()", 0, &match); in test_recursion()
2043 g_regex_unref (regex); in test_recursion()
2045regex = g_regex_new ("^(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )$", G_REGEX_OPTIMIZE|G_REGEX_EXTENDED… in test_recursion()
2046 g_assert (regex); in test_recursion()
2048 g_regex_match (regex, "(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()", 0, &match); in test_recursion()
2052 g_regex_unref (regex); in test_recursion()
2054regex = g_regex_new ("< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >", G_REGEX_OPTIMIZE|G_REGEX_EXTENDED… in test_recursion()
2055 g_assert (regex); in test_recursion()
2057 res = g_regex_match (regex, "<ab<01<23<4>>>>", 0, &match); in test_recursion()
2064 res = g_regex_match (regex, "<ab<01<xx<x>>>>", 0, &match); in test_recursion()
2071 g_regex_unref (regex); in test_recursion()
2073 regex = g_regex_new ("^((.)(?1)\\2|.)$", G_REGEX_OPTIMIZE, 0, &error); in test_recursion()
2074 g_assert (regex); in test_recursion()
2076 res = g_regex_match (regex, "abcdcba", 0, &match); in test_recursion()
2080 res = g_regex_match (regex, "abcddcba", 0, &match); in test_recursion()
2084 g_regex_unref (regex); in test_recursion()
2086 regex = g_regex_new ("^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$", G_REGEX_OPTIMIZE, 0, &error); in test_recursion()
2087 g_assert (regex); in test_recursion()
2089 res = g_regex_match (regex, "abcdcba", 0, &match); in test_recursion()
2093 res = g_regex_match (regex, "abcddcba", 0, &match); in test_recursion()
2097 g_regex_unref (regex); in test_recursion()
2099regex = g_regex_new ("^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",… in test_recursion()
2100 g_assert (regex); in test_recursion()
2102 res = g_regex_match (regex, "abcdcba", 0, &match); in test_recursion()
2106 res = g_regex_match (regex, "A man, a plan, a canal: Panama!", 0, &match); in test_recursion()
2110 res = g_regex_match (regex, "Oozy rat in a sanitary zoo", 0, &match); in test_recursion()
2114 g_regex_unref (regex); in test_recursion()
2120 GRegex *regex; in test_multiline() local
2126 regex = g_regex_new ("^a$", G_REGEX_MULTILINE|G_REGEX_DOTALL, 0, NULL); in test_multiline()
2129 g_regex_match (regex, "a\nb\na", 0, &info); in test_multiline()
2136 g_regex_unref (regex); in test_multiline()
2144 GRegex *regex; in test_explicit_crlf() local
2146 regex = g_regex_new ("[\r\n]a", 0, 0, NULL); in test_explicit_crlf()
2147 g_assert_cmpint (g_regex_get_has_cr_or_lf (regex), ==, TRUE); in test_explicit_crlf()
2148 g_regex_unref (regex); in test_explicit_crlf()
2154 GRegex *regex; in test_max_lookbehind() local
2156 regex = g_regex_new ("abc", 0, 0, NULL); in test_max_lookbehind()
2157 g_assert_cmpint (g_regex_get_max_lookbehind (regex), ==, 0); in test_max_lookbehind()
2158 g_regex_unref (regex); in test_max_lookbehind()
2160 regex = g_regex_new ("\\babc", 0, 0, NULL); in test_max_lookbehind()
2161 g_assert_cmpint (g_regex_get_max_lookbehind (regex), ==, 1); in test_max_lookbehind()
2162 g_regex_unref (regex); in test_max_lookbehind()
2164 regex = g_regex_new ("(?<=123)abc", 0, 0, NULL); in test_max_lookbehind()
2165 g_assert_cmpint (g_regex_get_max_lookbehind (regex), ==, 3); in test_max_lookbehind()
2166 g_regex_unref (regex); in test_max_lookbehind()
2178 g_test_add_func ("/regex/properties", test_properties); in main()
2179 g_test_add_func ("/regex/class", test_class); in main()
2180 g_test_add_func ("/regex/lookahead", test_lookahead); in main()
2181 g_test_add_func ("/regex/lookbehind", test_lookbehind); in main()
2182 g_test_add_func ("/regex/subpattern", test_subpattern); in main()
2183 g_test_add_func ("/regex/condition", test_condition); in main()
2184 g_test_add_func ("/regex/recursion", test_recursion); in main()
2185 g_test_add_func ("/regex/multiline", test_multiline); in main()
2186 g_test_add_func ("/regex/explicit-crlf", test_explicit_crlf); in main()
2187 g_test_add_func ("/regex/max-lookbehind", test_max_lookbehind); in main()