summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-29 00:49:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-29 08:12:11 -0500
commitcf522dcf2f14a60f9f1250117defae44ff417b5f (patch)
tree8a2a3221026f4a07e06e6b537d035c8cf8b71f87
parentae8297b785eacc61890b6042c0f89af6f65b3bb3 (diff)
downloadpango-cf522dcf2f14a60f9f1250117defae44ff417b5f.tar.gz
tabs: Tweak string format
Use newlines to separate tabs, rather than spaces.
-rw-r--r--pango/pango-tabs.c2
-rw-r--r--tests/testserialize.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/pango/pango-tabs.c b/pango/pango-tabs.c
index 318f305b..27ae3be8 100644
--- a/pango/pango-tabs.c
+++ b/pango/pango-tabs.c
@@ -395,7 +395,7 @@ pango_tab_array_to_string (PangoTabArray *tab_array)
for (int i = 0; i < tab_array->size; i++)
{
if (i > 0)
- g_string_append_c (s, ' ');
+ g_string_append_c (s, '\n');
if (tab_array->tabs[i].alignment == PANGO_TAB_RIGHT)
g_string_append (s, "right:");
diff --git a/tests/testserialize.c b/tests/testserialize.c
index 78424eff..95fb4cd4 100644
--- a/tests/testserialize.c
+++ b/tests/testserialize.c
@@ -91,17 +91,17 @@ test_serialize_tab_array (void)
""
};
const char *roundtripped[] = {
- "0 10 100 200 400",
- "0px 10px 100px 200px 400px",
- "0 10",
- "20 10",
- "10px right:20px center:30px decimal:40px",
+ "0\n10\n100\n200\n400",
+ "0px\n10px\n100px\n200px\n400px",
+ "0\n10",
+ "20\n10",
+ "10px\nright:20px\ncenter:30px\ndecimal:40px",
"decimal:10240:94",
""
};
const char *invalid[] = {
"not a tabarray",
- "-10\n-20",
+ "-10:-20",
"10ps 20pu",
"10, 20",
"10 20px 30",