summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-06 17:59:57 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-06 18:38:49 -0400
commit3bdec75f8c3291f7888cf7814551826e82927127 (patch)
treeea3f0188c8caa2fd9c0975b9ce26876ff2412c09
parent3147c7eed8f2bad3a27b45fbc1413df65469b387 (diff)
downloadpango-3bdec75f8c3291f7888cf7814551826e82927127.tar.gz
tests: Add some more script iter tests
-rw-r--r--tests/testscript.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testscript.c b/tests/testscript.c
index 33e8ad2e..7260dbbe 100644
--- a/tests/testscript.c
+++ b/tests/testscript.c
@@ -143,6 +143,7 @@ test_script_iter (void)
};
PangoScriptIter *iter;
+ PangoScriptIter *iter2;
GString *all = g_string_new (FALSE);
char *pos;
const char *start;
@@ -158,6 +159,8 @@ test_script_iter (void)
iter = pango_script_iter_new (all->str, -1);
+ iter2 = g_boxed_copy (pango_script_iter_get_type (), iter);
+
g_test_message ("Total length: %" G_GSIZE_FORMAT "\n", all->len);
pos = all->str;
@@ -183,6 +186,13 @@ test_script_iter (void)
pos = next_pos;
}
+ /* Check that copying the iter worked */
+ pango_script_iter_get_range (iter2, &start, &end, &script);
+ g_assert_true (start == all->str);
+ g_assert_true (end == all->str + strlen (test_data[0].run_text));
+ g_assert_true (script == test_data[0].run_code);
+ pango_script_iter_free (iter2);
+
pango_script_iter_free (iter);
/*