summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-07 22:20:18 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-07-07 22:20:18 +0000
commit55ed254127954c1dcb104ce93204da1c4dbd25e5 (patch)
treedd06c327fb05845b9845bbce6161a0ed7a4c839f
parent068aa03ceaa55537fc0144783c6446e03314c481 (diff)
parent74b126211feb9a0b7b9b2e137fdab1783681eaa4 (diff)
downloadpango-55ed254127954c1dcb104ce93204da1c4dbd25e5.tar.gz
Merge branch 'break-test' into 'master'
Make the break test actually test things See merge request GNOME/pango!70
-rw-r--r--tests/breaks/one.expected10
-rw-r--r--tests/meson.build2
-rw-r--r--tests/test-break.c12
3 files changed, 17 insertions, 7 deletions
diff --git a/tests/breaks/one.expected b/tests/breaks/one.expected
index 90ea8d18..7fb600e6 100644
--- a/tests/breaks/one.expected
+++ b/tests/breaks/one.expected
@@ -1,5 +1,5 @@
-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 lhc c c c c lc c c c Lc
-Whitespace: x x w w
-Words: s e s e s e s e
-Sentences: s e s e
+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 lhc c c c c lc c c c Lc
+Whitespace: x x w w
+Words: bs be bs be bs be b bs be b
+Sentences: bs e bs e b
diff --git a/tests/meson.build b/tests/meson.build
index 50176c3d..6357cd8a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -22,7 +22,7 @@ tests = [
[ 'testcolor' ],
[ 'testscript' ],
[ 'cxx-test', [ 'cxx-test.cpp' ] ],
- [ 'test-break' ],
+ [ 'test-break', [ 'test-break.c', 'test-common.c' ] ],
]
if build_pangoft2
diff --git a/tests/test-break.c b/tests/test-break.c
index 9f069c09..acbe9014 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -117,6 +117,11 @@ test_file (const gchar *filename, GString *string)
w++;
}
+ if (log.is_word_boundary)
+ {
+ g_string_append (s3, "b");
+ o++;
+ }
if (log.is_word_start)
{
g_string_append (s3, "s");
@@ -128,6 +133,11 @@ test_file (const gchar *filename, GString *string)
o++;
}
+ if (log.is_sentence_boundary)
+ {
+ g_string_append (s4, "b");
+ s++;
+ }
if (log.is_sentence_start)
{
g_string_append (s4, "s");
@@ -228,7 +238,7 @@ test_break (gconstpointer d)
test_file (filename, dump);
- //diff = diff_with_file (expected_file, dump->str, dump->len, &error);
+ diff = diff_with_file (expected_file, dump->str, dump->len, &error);
g_assert_no_error (error);
if (diff && diff[0])