From 6465e886fec7e1ac41ecd1d0d2181f4fa3546703 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 11 Jul 2011 13:55:53 +0000 Subject: [PATCH] Evas tests: Added a test for evas_textblock_node_format_list_get. SVN revision: 61243 --- legacy/evas/src/tests/evas_test_textblock.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/legacy/evas/src/tests/evas_test_textblock.c b/legacy/evas/src/tests/evas_test_textblock.c index 33651ce..b2b1a46 100644 --- a/legacy/evas/src/tests/evas_test_textblock.c +++ b/legacy/evas/src/tests/evas_test_textblock.c @@ -697,7 +697,7 @@ START_TEST(evas_textblock_formats) evas_object_textblock_size_formatted_get(tb, NULL, NULL); /* Removing paired formats. */ - evas_object_textblock_text_markup_set(tb,"aabbcc"); + evas_object_textblock_text_markup_set(tb, "aabbcc"); fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); @@ -707,7 +707,7 @@ START_TEST(evas_textblock_formats) fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); - evas_object_textblock_text_markup_set(tb,"aabbcc"); + evas_object_textblock_text_markup_set(tb, "aabbcc"); fnode = evas_textblock_node_format_first_get(tb); fnode = evas_textblock_node_format_next_get(fnode); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); @@ -718,6 +718,22 @@ START_TEST(evas_textblock_formats) fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- a")); + /* Format list get */ + evas_object_textblock_text_markup_set(tb, "aab" + "bbcc"); + const Eina_List *flist = evas_textblock_node_format_list_get(tb, "a"); + const Eina_List *itr; + EINA_LIST_FOREACH(flist, itr, fnode) + { + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); + } + + flist = evas_textblock_node_format_list_get(tb, "item"); + EINA_LIST_FOREACH(flist, itr, fnode) + { + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); + } + END_TB_TEST(); } END_TEST -- 2.7.4