tasn pushed a commit to branch evas-1.7. http://git.enlightenment.org/legacy/evas.git/commit/?id=b538b4449571c95a55306369b9b645d396b07183
commit b538b4449571c95a55306369b9b645d396b07183 Author: Tom Hacohen <[email protected]> Date: Mon Nov 25 14:38:05 2013 +0000 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_test_textblock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/evas_test_textblock.c b/src/tests/evas_test_textblock.c index 5540620..1c9ed96 100644 --- a/src/tests/evas_test_textblock.c +++ b/src/tests/evas_test_textblock.c @@ -1315,6 +1315,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, "<wrap=word>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 --
