From ada27a49d7100f336b9751b2c390fb14ccfe6a04 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 25 Nov 2013 14:38:05 +0000 Subject: [PATCH] Evas textblock: Added a test for wraps ending with whites. This tests for word wraps of lines ending with whites. Those whites should not be cut, they should be wrapped as well. --- src/tests/evas/evas_test_textblock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index 508f80416b..e19b1f22e6 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -1683,6 +1683,16 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w > (nw / 2)); + /* Word wrap ending with whites. */ + evas_object_resize(tb, 322, 400); + evas_object_textblock_text_markup_set(tb, "This is an example text that should break at the end aaa "); + + evas_textblock_cursor_paragraph_last(cur); + Evas_Coord cx, cy, cw, ch; + evas_textblock_cursor_text_prepend(cur, " "); + fail_if(-1 == evas_textblock_cursor_geometry_get(cur, &cx, &cy, &cw, &ch, + NULL, EVAS_TEXTBLOCK_CURSOR_BEFORE)); + END_TB_TEST(); } END_TEST