aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/tests/evas_test_textblock.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-22 09:19:23 +1000
committerDavid Walter Seikel2012-04-22 09:19:23 +1000
commitc963d75dfdeec11f82e79e727062fbf89afa2c04 (patch)
tree895633dbf641110be46f117c29890c49b3ffc0bd /libraries/evas/src/tests/evas_test_textblock.c
parentAdding the new extantz viewer and grid manager. (diff)
downloadSledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip
SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz
SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2
SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz
Update EFL to latest beta.
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/tests/evas_test_textblock.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/libraries/evas/src/tests/evas_test_textblock.c b/libraries/evas/src/tests/evas_test_textblock.c
index cf6a78b..983a2fc 100644
--- a/libraries/evas/src/tests/evas_test_textblock.c
+++ b/libraries/evas/src/tests/evas_test_textblock.c
@@ -1283,6 +1283,15 @@ START_TEST(evas_textblock_various)
1283 evas_object_textblock_text_markup_set(tb, "a<ps/>a<ps/>a"); 1283 evas_object_textblock_text_markup_set(tb, "a<ps/>a<ps/>a");
1284 fail_if(!_evas_textblock_check_item_node_link(tb)); 1284 fail_if(!_evas_textblock_check_item_node_link(tb));
1285 1285
1286 /* These shouldn't crash (although the desired outcome is not yet defined) */
1287 evas_object_textblock_text_markup_set(tb, "&#xfffc;");
1288 evas_textblock_cursor_pos_set(cur, 0);
1289 evas_textblock_cursor_char_delete(cur);
1290
1291 evas_object_textblock_text_markup_set(tb, "\xEF\xBF\xBC");
1292 evas_textblock_cursor_pos_set(cur, 0);
1293 evas_textblock_cursor_char_delete(cur);
1294
1286 END_TB_TEST(); 1295 END_TB_TEST();
1287} 1296}
1288END_TEST 1297END_TEST
@@ -2090,6 +2099,29 @@ START_TEST(evas_textblock_size)
2090 fail_if((w != nw) || (h != nh)); 2099 fail_if((w != nw) || (h != nh));
2091 fail_if(w <= 0); 2100 fail_if(w <= 0);
2092 2101
2102 /* This time with margins. */
2103 {
2104 Evas_Textblock_Style *newst;
2105 Evas_Coord oldw, oldh, oldnw, oldnh;
2106
2107 evas_object_textblock_text_markup_set(tb, buf);
2108 evas_object_textblock_size_formatted_get(tb, &oldw, &oldh);
2109 evas_object_textblock_size_native_get(tb, &oldnw, &oldnh);
2110
2111
2112 newst = evas_textblock_style_new();
2113 fail_if(!newst);
2114 evas_textblock_style_set(newst,
2115 "DEFAULT='left_margin=4 right_margin=4'");
2116 evas_object_textblock_style_user_push(tb, newst);
2117
2118 evas_object_textblock_size_formatted_get(tb, &w, &h);
2119 evas_object_textblock_size_native_get(tb, &nw, &nh);
2120
2121 fail_if((w != oldw + 8) || (h != oldh) ||
2122 (nw != oldnw + 8) || (nh != oldnh));
2123 }
2124
2093 /* FIXME: There is a lot more to be done. */ 2125 /* FIXME: There is a lot more to be done. */
2094 END_TB_TEST(); 2126 END_TB_TEST();
2095} 2127}