Home | History | Annotate | Download | only in tests

Lines Matching full:test_replace

1150 test_replace (const gchar *pattern,
1179 #define TEST_REPLACE(pattern, string, start_position, replacement, expected) { \
1181 if (test_replace (pattern, string, start_position, replacement, expected)) \
2004 /* TEST_REPLACE(pattern, string, start_position, replacement, expected) */
2005 TEST_REPLACE("a", "ababa", 0, "A", "AbAbA");
2006 TEST_REPLACE("a", "ababa", 1, "A", "abAbA");
2007 TEST_REPLACE("a", "ababa", 2, "A", "abAbA");
2008 TEST_REPLACE("a", "ababa", 3, "A", "ababA");
2009 TEST_REPLACE("a", "ababa", 4, "A", "ababA");
2010 TEST_REPLACE("a", "ababa", 5, "A", "ababa");
2011 TEST_REPLACE("a", "ababa", 6, "A", "ababa");
2012 TEST_REPLACE("a", "abababa", 2, "A", "abAbAbA");
2013 TEST_REPLACE("a", "abab", 0, "A", "AbAb");
2014 TEST_REPLACE("a", "baba", 0, "A", "bAbA");
2015 TEST_REPLACE("a", "bab", 0, "A", "bAb");
2016 TEST_REPLACE("$^", "abc", 0, "X", "abc");
2017 TEST_REPLACE("(.)a", "ciao", 0, "a\\1", "caio");
2018 TEST_REPLACE("a.", "abc", 0, "\\0\\0", "ababc");
2019 TEST_REPLACE("a", "asd", 0, "\\0101", "Asd");
2020 TEST_REPLACE("(a).\\1", "aba cda", 0, "\\1\\n", "a\n cda");
2021 TEST_REPLACE("a" AGRAVE "a", "a" AGRAVE "a", 0, "x", "x");
2022 TEST_REPLACE("a" AGRAVE "a", "a" AGRAVE "a", 0, OGRAVE, OGRAVE);
2023 TEST_REPLACE("[^-]", "-" EURO "-x-" HSTROKE, 0, "a", "-a-a-a");
2024 TEST_REPLACE("[^-]", "-" EURO "-" HSTROKE, 0, "a\\g<0>a", "-a" EURO "a-a" HSTROKE "a");
2025 TEST_REPLACE("-", "-" EURO "-" HSTROKE, 0, "", EURO HSTROKE);
2026 TEST_REPLACE(".*", "hello", 0, "\\U\\0\\E", "HELLO");
2027 TEST_REPLACE(".*", "hello", 0, "\\u\\0", "Hello");
2028 TEST_REPLACE("\\S+", "hello world", 0, "\\U-\\0-", "-HELLO- -WORLD-");
2029 TEST_REPLACE(".", "a", 0, "\\A", NULL);
2030 TEST_REPLACE(".", "a", 0, "\\g", NULL);