[pango/test-shape-fix: 2/2] tests: Improve output of test-shape




commit abe0e2ac62c5b8abfe0f9f43a0c0323477535c56
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Nov 6 13:13:37 2020 -0500

    tests: Improve output of test-shape
    
    We don't have any test cases for this in our testsuite,
    but it is useful to run this manually to see the shaping
    results. The output was missing all but the first char
    for the last cluster in an item.

 tests/test-shape.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/test-shape.c b/tests/test-shape.c
index c2488dbf..53d6d40a 100644
--- a/tests/test-shape.c
+++ b/tests/test-shape.c
@@ -232,7 +232,7 @@ test_file (const gchar *filename, GString *string)
               if (i + 1 < glyphs->num_glyphs)
                 p1 = text + item->offset + glyphs->log_clusters[i + 1];
               else
-                p1 = g_utf8_next_char (p);
+                p1 = text + item->offset + item->length;
             }
           append_text (s1, p, p1 - p);
           g_string_append_printf (s2, "[%d]", gi->glyph);


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