summaryrefslogtreecommitdiff
path: root/src/tests/evas
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-01-07 08:32:19 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-13 11:33:14 +0100
commitd6649ad80a70a8d9e9d73c0cdd48ef4a459072a1 (patch)
tree7007cb081b9e2efab639b1e181fbceaf11ccc6ec /src/tests/evas
parent3249b53d1cc9f9e82f33e84151d9b6775ad9c184 (diff)
evas_textblock: emit change event on markup_set
Markup_set will emit change events, if user set empty string. This Change is related to D10985, where markup_prepend will not emit events if empty string was added Reviewed-by: Al Poole <netstar@gmail.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11020
Diffstat (limited to 'src/tests/evas')
-rw-r--r--src/tests/evas/evas_test_textblock.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index b51f149174..8560e36e7c 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4942,6 +4942,31 @@ EFL_START_TEST(efl_text_style)
4942{ 4942{
4943 START_EFL_CANVAS_TEXTBLOCK_TEST(); 4943 START_EFL_CANVAS_TEXTBLOCK_TEST();
4944 4944
4945 int changed_emit = 0;
4946 efl_event_callback_add(txt, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, _increment_int_changed, &changed_emit);
4947 efl_text_set(txt, "Hello");
4948 ck_assert_int_eq(changed_emit, 1);
4949 efl_text_set(txt, "");
4950 ck_assert_int_eq(changed_emit, 2);
4951 efl_text_set(txt, "");
4952 ck_assert_int_eq(changed_emit, 2);
4953
4954 changed_emit = 0;
4955 efl_text_markup_set(txt, "&quot;Hello&quot;");
4956 ck_assert_int_eq(changed_emit, 1);
4957 efl_text_markup_set(txt, "");
4958 ck_assert_int_eq(changed_emit, 2);
4959 efl_text_markup_set(txt, "");
4960 ck_assert_int_eq(changed_emit, 2);
4961
4962 END_EFL_CANVAS_TEXTBLOCK_TEST();
4963}
4964EFL_END_TEST
4965
4966EFL_START_TEST(efl_text_markup)
4967{
4968 START_EFL_CANVAS_TEXTBLOCK_TEST();
4969
4945 efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE); 4970 efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
4946 ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE); 4971 ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
4947 efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE); 4972 efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE);
@@ -4992,5 +5017,6 @@ void evas_test_textblock(TCase *tc)
4992 tcase_add_test(tc, efl_text_font); 5017 tcase_add_test(tc, efl_text_font);
4993 tcase_add_test(tc, efl_canvas_textblock_style); 5018 tcase_add_test(tc, efl_canvas_textblock_style);
4994 tcase_add_test(tc, efl_text_style); 5019 tcase_add_test(tc, efl_text_style);
5020 tcase_add_test(tc, efl_text_markup);
4995} 5021}
4996 5022