[gtksourceview] testsuite: a few more regex tests



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]