[pango/tab-align: 3/3] tabs: Tweak string format




commit d430b611b2d1a6b8da4ead6825d55c17b2b67ec8
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 29 00:49:45 2021 -0500

    tabs: Tweak string format
    
    Use newlines to separate tabs, rather than spaces.

 pango/pango-tabs.c    |  2 +-
 tests/testserialize.c | 12 ++++++------
 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",


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