[pango/markup-parse-fixes: 2/5] markup tests: Pass accel_marker='_'
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/markup-parse-fixes: 2/5] markup tests: Pass accel_marker='_'
- Date: Wed, 3 Mar 2021 02:27:37 +0000 (UTC)
commit 565c111c430410e0858b577fc97721659c407d0d
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 2 20:25:45 2021 -0500
markup tests: Pass accel_marker='_'
And print out the accel_char if we get one back.
This will let us add tests for accel functionality.
tests/markup-parse.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
index 5f1454a1..2ee8c85e 100644
--- a/tests/markup-parse.c
+++ b/tests/markup-parse.c
@@ -47,11 +47,12 @@ test_file (const gchar *filename, GString *string)
gboolean ret;
char *str;
int start, end;
+ gunichar accel = 0;
g_file_get_contents (filename, &contents, &length, &error);
g_assert_no_error (error);
- ret = pango_parse_markup (contents, length, 0, &attrs, &text, NULL, &error);
+ ret = pango_parse_markup (contents, length, '_', &attrs, &text, &accel, &error);
g_free (contents);
if (ret)
@@ -74,6 +75,12 @@ test_file (const gchar *filename, GString *string)
pango_attr_list_unref (attrs);
pango_font_description_free (desc);
g_free (text);
+
+ if (accel)
+ {
+ g_string_append (string, "\n\n---\n\n");
+ g_string_append_unichar (string, accel);
+ }
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]