[pango/matthiasc/for-main: 19/25] tests: Tweak test-break output
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-main: 19/25] tests: Tweak test-break output
- Date: Sun, 22 Aug 2021 04:36:52 +0000 (UTC)
commit 0d9fb666ad17ebe28222d361a20fa73f258fe6a5
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 21 20:28:06 2021 -0400
tests: Tweak test-break output
Change the order in test-break output to be
sentence, word, grapheme. Update all affected
test outputs.
tests/breaks/eleven.expected | 2 +-
tests/breaks/four.expected | 2 +-
tests/breaks/nine.expected | 2 +-
tests/breaks/one.expected | 2 +-
tests/breaks/ten.expected | 2 +-
tests/breaks/three.expected | 2 +-
tests/breaks/two.expected | 2 +-
tests/test-break.c | 33 +++++++++++++++++----------------
8 files changed, 24 insertions(+), 23 deletions(-)
---
diff --git a/tests/breaks/eleven.expected b/tests/breaks/eleven.expected
index 5f45affe..45c7ad01 100644
--- a/tests/breaks/eleven.expected
+++ b/tests/breaks/eleven.expected
@@ -1,6 +1,6 @@
Text: ❤️︎︎ 👨[0x200d]🦰 👨🏿[0x200d]🦱 0️⃣
🏴[0xe0075][0xe0073][0xe0063][0xe0061][0xe007f] 🇩🇪️ [0x0a]
Breaks: c lc lc lc lc lc c c
Whitespace: w w
-Words: b b b bs be b b b
Sentences: bs e b
+Words: b b b bs be b b b
Graphemes: b b b b b b b b
diff --git a/tests/breaks/four.expected b/tests/breaks/four.expected
index b7f1a86c..ce58e10b 100644
--- a/tests/breaks/four.expected
+++ b/tests/breaks/four.expected
@@ -1,6 +1,6 @@
Text: ภ า ษ า ไ ท ย [ ] ห รื อ [ ] ภ า ษ า ไ ท ย ก
ล า ง [ ] เ ป็ น ภ า ษ า ร า ช ก า ร แ ล ะ ภ า ษ า
ป ร ะ จ ำ ช า ติ ข อ ง ป ร ะ เ ท ศ ไ ท ย [ ] ภ า
ษ า ไ ท ย เ ป็ น ภ า ษ า ใ น ก ลุ่ ม ภ า ษ า
ไ ท �
��ซึ่ ง เ ป็ น ก ลุ่ ม ย่ อ ย ข อ ง ต ร ะ กู ล
ภ า ษ า ข ร้ า [ ] ไ ท [ ] สั น นิ ษ ฐ า น ว่ า [ ]
ภ า ษ า ใ น ต ร ะ กู ล นี้ มี ถิ่ น ก ำ เ นิ
ด จ า ก ท า ง ต อ น ใ ต้ ข อ ง ป ร ะ เ ท ศ
จี น [ ] แ ล ะ นั ก ภ า ษ า ศ า ส ต ร์ บ า ง
ส่ ว น เ ส น อ ว่ า [ ] ภ า ษ า ไ ท ย น่ า จ ะ
มี ค ว า ม เ ชื่ อ ม โ ย ง กั บ ต ร ะ กู ล ภ
า ษ า อ อ ส โ ต ร [ ] เ อ เ ชี ย ติ ก [ ] ต ร ะ กู
ล
ภ า ษ า อ อ ส โ ต ร นี เ ซี ย น [ ] แ ล ะ ต ร ะ
กู ล ภ า ษ า จี น [ ] ทิ เ บ ต [0x0a]
Breaks: c c c c lc c c c lc c c c lc c c c lc c c lc c c c c lc c c lc c c c lc c c
c c c lc c c lc c c c lc c c c c lc c c lc c c lc c c c c c lc c c c lc c c c lc c c lc c c lc
c c c lc c lc c c lc c c c lc c lc c lc c c lc c c lc c c lc c c lc c c c c lc c c c lc
c c c lc c c lc c c c c c c lc c c lc c c c lc c lc c c c c lc lc lc c lc c c c
c lc c c lc c c lc c c lc c lc c c lc c c c c c lc c c lc c c lc c lc c c c c c c c c lc c
c lc c c lc c c c lc c c lc c c c lc c c lc c lc c lc lc c c c lc c c c lc c c lc c lc
c c c c lc c c c lc c lc c c c c lc c c c c lc c c lc c c c c lc c c c lc c lc c c c c c
c c c c lc c c lc c c c c lc c c c lc c c lc c c c c c
Whitespace: x x x
x
x x x
x
x
x x
x x w w
-Words: bs b b b bse b b be bse b b be bse b b b bse b b bse b b b be bse b b bse b b b bse b b
b b b bse b b bse b b b bse b b b b bse b b bse b b bse b b b b b bse b b be bse b b b bse b b bse b b
bse b b b bse b bse b b bse b b b bse b bse b bse b b bse b b bse b b bse b b bse b b b b bse b b b
bse b b be bse b be bse b b b b b b bse b be bse b b b bse b bse b b b b bse bse bse b bse b
b b b bse b b bse b b bse b b bse b bse b b bse b b b b b bse b be bse b b bse b bse b b b b b b b b
bse b b bse b b bse b b b bse b be bse b b b bse b b bse b bse b bse bse b b b bse b b b bse b b bse
b bse b b b b bse b b b bse b bse b b b be bse b b b b bse b be bse b b b b bse b b b bse b bse b b b
b b b b b be bse b b bse b b b b bse b b b bse b be bse b b b be b
Sentences: bs
e b
+Words: bs b b b bse b b be bse b b be bse b b b bse b b bse b b b be bse b b bse b b b bse b b
b b b bse b b bse b b b bse b b b b bse b b bse b b bse b b b b b bse b b be bse b b b bse b b bse b b
bse b b b bse b bse b b bse b b b bse b bse b bse b b bse b b bse b b bse b b bse b b b b bse b b b
bse b b be bse b be bse b b b b b b bse b be bse b b b bse b bse b b b b bse bse bse b bse b
b b b bse b b bse b b bse b b bse b bse b b bse b b b b b bse b be bse b b bse b bse b b b b b b b b
bse b b bse b b bse b b b bse b be bse b b b bse b b bse b bse b bse bse b b b bse b b b bse b b bse
b bse b b b b bse b b b bse b bse b b b be bse b b b b bse b be bse b b b b bse b b b bse b bse b b b
b b b b b be bse b b bse b b b b bse b b b bse b be bse b b b be b
Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b
diff --git a/tests/breaks/nine.expected b/tests/breaks/nine.expected
index 4f6f95a3..957f67e5 100644
--- a/tests/breaks/nine.expected
+++ b/tests/breaks/nine.expected
@@ -1,6 +1,6 @@
Text: मी [ ] का च [ ] खा ऊ [ ] श क तो , [ ] म ला [ ]
ते [ ] दु ख त [ ] ना ह [0x0a] मैं [ ] काँ च [ ] खा [ ] स
क ता [ ] हूँ , [ ] मु झे [ ] उ स [ ] से [ ] को ई [ ] पी
डा [ ] न हीं [ ] हो त [0x0a] நா ன் [ ] க ண் ணா டி [ ]
சா ப் பி டு வே ன் , [ ] �
��அ த னா ல் [ ] எ ன க் கு [ ] ஒ ரு [ ] கே டு ம் [ ] வ
ரா த [0x0a] ﻢ ﯾ ں [ ] ﮎ ﺎ ﻨ ﭼ [ ] ﮎ ھ ﺍ [ ] ﺲ ﮑ ﺗ ﺍ [ ] ہ ﻭ
ں [ ] ﺍ ﻭ ﺭ [ ] ﻢ ﺟ ھ ے [ ] ﺖ ﮑ ﻠ ﯿ ﻓ [ ] ﻥ ہ ﯼ ں [ ] ہ ﻮ ﺘ
ﯾ [ ] [0x0a] ﺰ ﻫ [ ] ﺶ ﻴ ﺸ ﻫ [ ] ﺥ ﻭ ړ ﻝ ې [ ] ﺶ ﻣ ، [ ] ﻪ ﻐ ﻫ
[ ] ﻡ ﺍ [ ] ﻦ ﻫ [ ] ﺥ ﻭ ږ ﻮ ﻳ��
� [0x0a]
Breaks: c c lc c c lc c c lc c c c c lc c c lc c lc c c c lc c c c
c lc c c lc c lc c c c lc c c lc c c lc c c lc c lc c c lc c c lc
c c lc c c c c c lc c c c c lc c c c c c c c lc c c c c lc c c c c
lc c c lc c c c lc c c c c c c c lc c c c c lc c c c lc c c c c lc c c c lc
c c c lc c c c c lc c c c c c lc c c c c lc c c c c c c c c lc c c c c lc c c c c
c lc c c c lc c c c lc c c lc c c lc c c c c c c
Whitespace: x x x x x x x w
x x x x x x x x x x
x w x x x x x
x x w x x x x x
x x x x x w x x x
x x x x w w
-Words: bs be bs be bs be bs be b bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be
bs be bs be bs be bs be bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be bs
be bs be b bs be bs be bs be bs be b
Sentences: bs e bs
e bs
e bs
e bs
e b
+Words: bs be bs be bs be bs be b bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be
bs be bs be bs be bs be bs be bs be bs be bs be bs
be bs be bs be bs be bs be b bs be bs be bs
be bs be b bs be bs be bs be bs be b
Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b b b b b b b b b b b b b b b b b b b b b b
diff --git a/tests/breaks/one.expected b/tests/breaks/one.expected
index f3ab2612..bbae494d 100644
--- a/tests/breaks/one.expected
+++ b/tests/breaks/one.expected
@@ -1,6 +1,6 @@
Text: a b c / d e f [ ] g h i [0xad] j k l . [ ] B l a
[0x0a]
Breaks: c c c c lc c c c lc c c c lc c c c c lc c c c c
Whitespace: x x w w
-Words: bs be bs be bs be b bs be b
Sentences: bs e bs e b
+Words: bs be bs be bs be b bs be b
Graphemes: b b b b b b b b b b b b b b b b b b b b b b
diff --git a/tests/breaks/ten.expected b/tests/breaks/ten.expected
index a83252da..c1f8cc35 100644
--- a/tests/breaks/ten.expected
+++ b/tests/breaks/ten.expected
@@ -1,6 +1,6 @@
Text: i ක්[0x200d]ක [ ] a[0x200c] a் [0x0a]
Breaks: c c c lc c c c
Whitespace: x w w
-Words: bs be bs be b
Sentences: bs e b
+Words: bs be bs be b
Graphemes: b b b b b b b
diff --git a/tests/breaks/three.expected b/tests/breaks/three.expected
index 72e6fbe2..7f078f4f 100644
--- a/tests/breaks/three.expected
+++ b/tests/breaks/three.expected
@@ -1,6 +1,6 @@
Text: o n e [ ] t w o [0x2028] r e d [ ] b l u e[0x200d] g r e
e n [0x0a]
Breaks: c c c c lc c c c Lc c c c lc c c c c c c c c c c
Whitespace: x w x w w
-Words: bs be bs be bs be bs be b
Sentences: bs e bs e b
+Words: bs be bs be bs be bs be b
Graphemes: b b b b b b b b b b b b b b b b b b b b b b b
diff --git a/tests/breaks/two.expected b/tests/breaks/two.expected
index 9bea7f7d..3ec2d948 100644
--- a/tests/breaks/two.expected
+++ b/tests/breaks/two.expected
@@ -1,6 +1,6 @@
Text: g o r i l · l e s [0x0a]
Breaks: c c c c c c c c c c c
Whitespace: w w
-Words: bs e s be b
Sentences: bs e b
+Words: bs e s be b
Graphemes: b b b b b b b b b b b
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]