tests: Add a case for ellipsis in complex markup text.
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 2 Apr 2014 06:57:16 +0000 (15:57 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 2 Apr 2014 06:57:17 +0000 (15:57 +0900)
Summary: Evas textblock can't cut off text properly when it has separated items.

Reviewers: tasn, woohyun, raster

Reviewed By: raster

CC: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D667

src/tests/evas/evas_test_textblock.c

index 8b23393..44ad205 100644 (file)
@@ -1740,6 +1740,17 @@ START_TEST(evas_textblock_wrapping)
    evas_object_textblock_size_formatted_get(tb, &w, &h);
    fail_if((w > (nw / 2)) || (h != nh));
 
+   evas_object_textblock_text_markup_set(tb, "<color=#ff0000ff>a</>a"
+                                         "<color=#ff0000ff>a</>a"
+                                         "<color=#ff0000ff>a</>a"
+                                         "<color=#ff0000ff>a</>a"
+                                         "<color=#ff0000ff>a</>a");
+   evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0");
+   evas_object_textblock_size_native_get(tb, &nw, &nh);
+   evas_object_resize(tb, nw / 2, nh);
+   evas_object_textblock_size_formatted_get(tb, &w, &h);
+   fail_if((w > (nw / 2)) || (h != nh));
+
    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);