[gtksourceview] testsuite: a few more regex tests
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] testsuite: a few more regex tests
- Date: Mon, 5 Jul 2021 00:14:32 +0000 (UTC)
commit 9e594793bd524defdb2b38ec61d15b6f41dc149a
Author: Christian Hergert <chergert redhat com>
Date: Sun Jul 4 17:14:24 2021 -0700
testsuite: a few more regex tests
testsuite/test-regex.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/testsuite/test-regex.c b/testsuite/test-regex.c
index a4cd35a2..725572f7 100644
--- a/testsuite/test-regex.c
+++ b/testsuite/test-regex.c
@@ -190,6 +190,22 @@ test_compare (void)
compare_impl_regex_to_g_regex ("hello\nworld\n", "(.*\n)*", 0x2003, 0x400);
compare_impl_regex_to_g_regex ("hello\nworld\n", "(.*\\n)*", 0x2003, 0x400);
+
+ compare_impl_regex_to_g_regex ("&aa", "\\baa\\b", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\342\200\223aa", "\\baa\\b", 0x2003, 0x400);
+
+ compare_impl_regex_to_g_regex ("12\n", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n23\n", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n123\n", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n23\n", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n12", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("3", "(?<=1)23", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n123 123\n", "(?<=1)23", 0x2003, 0x400);
+
+ compare_impl_regex_to_g_regex ("12\n", "12(?=3)", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("123\n", "12(?=3)", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n123", "12(?=3)", 0x2003, 0x400);
+ compare_impl_regex_to_g_regex ("\n123 123\n", "12(?=3)", 0x2003, 0x400);
}
int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]