diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-07 17:58:34 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-07 18:17:04 -0400 |
commit | 74b126211feb9a0b7b9b2e137fdab1783681eaa4 (patch) | |
tree | dd06c327fb05845b9845bbce6161a0ed7a4c839f /tests | |
parent | 068aa03ceaa55537fc0144783c6446e03314c481 (diff) | |
download | pango-74b126211feb9a0b7b9b2e137fdab1783681eaa4.tar.gz |
Make the break test actually test things
We were not diffing the output against the
expected results.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/breaks/one.expected | 10 | ||||
-rw-r--r-- | tests/meson.build | 2 | ||||
-rw-r--r-- | tests/test-break.c | 12 |
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]) |