[gtksourceview] testsuite: use G_REGEX_RAW with invalid UTF-8
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] testsuite: use G_REGEX_RAW with invalid UTF-8
- Date: Thu, 29 Sep 2022 20:45:50 +0000 (UTC)
commit 87e62bad1092ba795d8995ac27222e320fb1a14d
Author: Moody <mooodyhunter outlook com>
Date: Thu Sep 29 15:01:04 2022 +0000
testsuite: use G_REGEX_RAW with invalid UTF-8
testsuite/test-regex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/test-regex.c b/testsuite/test-regex.c
index c1add0e9..1306f1c5 100644
--- a/testsuite/test-regex.c
+++ b/testsuite/test-regex.c
@@ -195,7 +195,8 @@ test_compare (void)
compare_impl_regex_to_g_regex ("hello\nworld\n", "(.*\\n)*", compile, match);
compare_impl_regex_to_g_regex ("&aa", "\\baa\\b", compile, match);
- compare_impl_regex_to_g_regex ("\342\200\223aa", "\\baa\\b", compile, match);
+ /* this can be a invalid UTF-8 string if substring-ed, make glib think it's a raw string */
+ compare_impl_regex_to_g_regex ("\342\200\223aa", "\\baa\\b", compile | G_REGEX_RAW, match);
compare_impl_regex_to_g_regex ("12\n", "(?<=1)23", compile, match);
compare_impl_regex_to_g_regex ("\n23\n", "(?<=1)23", compile, match);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]