From 0d9fb666ad17ebe28222d361a20fa73f258fe6a5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 21 Aug 2021 20:28:06 -0400 Subject: tests: Tweak test-break output Change the order in test-break output to be sentence, word, grapheme. Update all affected test outputs. --- tests/test-break.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'tests/test-break.c') diff --git a/tests/test-break.c b/tests/test-break.c index d59971a0..3fb5cdcd 100644 --- a/tests/test-break.c +++ b/tests/test-break.c @@ -106,8 +106,8 @@ test_file (const gchar *filename, GString *string) s1 = g_string_new ("Breaks: "); s2 = g_string_new ("Whitespace: "); - s3 = g_string_new ("Words:"); - s4 = g_string_new ("Sentences:"); + s3 = g_string_new ("Sentences:"); + s4 = g_string_new ("Words:"); s5 = g_string_new ("Graphemes:"); g_string_append (string, "Text: "); @@ -157,37 +157,38 @@ test_file (const gchar *filename, GString *string) w++; } - if (log.is_word_boundary) + if (log.is_sentence_boundary) { g_string_append (s3, "b"); - o++; + s++; } - if (log.is_word_start) + if (log.is_sentence_start) { g_string_append (s3, "s"); - o++; + s++; } - if (log.is_word_end) + if (log.is_sentence_end) { g_string_append (s3, "e"); - o++; + s++; } - if (log.is_sentence_boundary) + if (log.is_word_boundary) { g_string_append (s4, "b"); - s++; + o++; } - if (log.is_sentence_start) + if (log.is_word_start) { g_string_append (s4, "s"); - s++; + o++; } - if (log.is_sentence_end) + if (log.is_word_end) { g_string_append (s4, "e"); - s++; + o++; } + if (log.is_cursor_position) { g_string_append (s5, "b"); @@ -199,8 +200,8 @@ test_file (const gchar *filename, GString *string) g_string_append_printf (string, "%*s", m, ""); g_string_append_printf (s1, "%*s", m - b, ""); g_string_append_printf (s2, "%*s", m - w, ""); - g_string_append_printf (s3, "%*s", m - o, ""); - g_string_append_printf (s4, "%*s", m - s, ""); + g_string_append_printf (s3, "%*s", m - s, ""); + g_string_append_printf (s4, "%*s", m - o, ""); g_string_append_printf (s5, "%*s", m - g, ""); if (i < len - 1) -- cgit v1.2.1