[gtksourceview] testsuite: ensure backreference is not unescaped



commit 9e49510b41c72e9ba2ca7fd0cdfbf916da6f9445
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 28 15:42:04 2021 -0700

    testsuite: ensure backreference is not unescaped

 testsuite/test-utils.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/testsuite/test-utils.c b/testsuite/test-utils.c
index 3ebd2534..99663d52 100644
--- a/testsuite/test-utils.c
+++ b/testsuite/test-utils.c
@@ -47,6 +47,10 @@ test_unescape_search_text (void)
        unescaped_text = gtk_source_utils_unescape_search_text ("foo\n bar\r ß\t hello\\blah");
        g_assert_cmpstr (unescaped_text, ==, "foo\n bar\r ß\t hello\\blah");
        g_free (unescaped_text);
+
+       unescaped_text = gtk_source_utils_unescape_search_text ("\\n \\1");
+       g_assert_cmpstr (unescaped_text, ==, "\n \\1");
+       g_free (unescaped_text);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]