tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4f3ab0db3473f2d609058a13c76f187680df6790

commit 4f3ab0db3473f2d609058a13c76f187680df6790
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Aug 20 15:46:22 2014 +0100

    Evas textblock: Add a test for multiline ellipsis.
    
    This tests that even with multiline ellipsis, the ellipsis in the second
    line is not overdone (i.e it only does ellipsis as needed).
    
    This is a test for something we found out when we applied D1311 (for T1213).
---
 src/tests/evas/evas_test_textblock.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index e7d8cc9..c740be2 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1752,6 +1752,10 @@ START_TEST(evas_textblock_wrapping)
 
 
    /* Ellipsis */
+   int ellip_w = 0;
+   evas_object_textblock_text_markup_set(tb, "…");
+   evas_object_textblock_size_native_get(tb, &ellip_w, NULL);
+
    evas_object_textblock_text_markup_set(tb, "aaaaaaaaaaaaaaaaaa<br/>b");
    evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0 wrap=word");
    evas_object_textblock_size_native_get(tb, &nw, &nh);
@@ -1801,6 +1805,19 @@ START_TEST(evas_textblock_wrapping)
         }
    }
 
+   evas_object_textblock_text_markup_set(tb, "aaaaaaaaaaaaaaaaaa");
+   evas_object_textblock_size_native_get(tb, &nw, &nh);
+
+   evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0 wrap=char");
+   nw /= 3;
+   nh *= 2;
+   evas_object_resize(tb, nw, nh);
+
+     {
+        evas_object_textblock_line_number_geometry_get(tb, 1, NULL, NULL, &w, 
NULL);
+        ck_assert_int_gt(w, ellip_w);
+     }
+
    /* 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     ");

-- 


Reply via email to