summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test-break.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-break.c b/tests/test-break.c
index a3930937..b906a7e2 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -50,6 +50,7 @@ test_file (const gchar *filename, GString *string)
char *text;
PangoAttrList *attributes;
PangoLayout *layout;
+ PangoLayout *layout2;
g_file_get_contents (filename, &contents, &length, &error);
g_assert_no_error (error);
@@ -84,6 +85,14 @@ test_file (const gchar *filename, GString *string)
pango_layout_get_log_attrs (layout, &attrs, &len);
+ layout2 = pango_layout_copy (layout);
+ attrs2 = pango_layout_get_log_attrs_readonly (layout2, &len2);
+
+ g_assert_cmpint (len, ==, len2);
+ g_assert_true (memcmp (attrs, attrs2, sizeof (PangoLogAttr) * len) == 0);
+
+ g_object_unref (layout2);
+
s1 = g_string_new ("Breaks: ");
s2 = g_string_new ("Whitespace: ");
s3 = g_string_new ("Words:");