summaryrefslogtreecommitdiff
path: root/src/tests/evas
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-02-11 12:03:00 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-02-11 12:10:00 +0100
commit4f99a37aee19e743df40e04b7e13574216f8d619 (patch)
tree377be132904b461271ecde3144cac4cf812bb469 /src/tests/evas
parentf546a5700310092d66f7afbec60d4f3661ff1d92 (diff)
efl.canvas.textblock: allow all white spaces in style string not just space
Summary: style string can contain any kind of white spaces and it will be fine For example ``` "font=sans font_size=30 color=red " ``` Is the same as ``` "font=sans\tfont_size=30\n color=red " ``` Reviewers: woohyun, segfaultxavi, tasn, zmike Reviewed By: segfaultxavi Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8532 Differential Revision: https://phab.enlightenment.org/D11303
Diffstat (limited to 'src/tests/evas')
-rw-r--r--src/tests/evas/evas_test_textblock.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index a4e493a428..4de3477fb2 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4965,6 +4965,7 @@ EFL_END_TEST
4965EFL_START_TEST(efl_text_style) 4965EFL_START_TEST(efl_text_style)
4966{ 4966{
4967 START_EFL_CANVAS_TEXTBLOCK_TEST(); 4967 START_EFL_CANVAS_TEXTBLOCK_TEST();
4968 Eina_Size2D size1, size2;
4968 4969
4969 int changed_emit = 0; 4970 int changed_emit = 0;
4970 efl_event_callback_add(txt, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, _increment_int_changed, &changed_emit); 4971 efl_event_callback_add(txt, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, _increment_int_changed, &changed_emit);
@@ -4983,6 +4984,15 @@ EFL_START_TEST(efl_text_style)
4983 efl_text_markup_set(txt, ""); 4984 efl_text_markup_set(txt, "");
4984 ck_assert_int_eq(changed_emit, 2); 4985 ck_assert_int_eq(changed_emit, 2);
4985 4986
4987 // Style Applying
4988 efl_text_set(txt,"A");
4989 efl_canvas_textblock_style_apply(txt,"\tfont_size=2\t");
4990 size1 = efl_canvas_textblock_size_native_get(txt);
4991 efl_canvas_textblock_style_apply(txt,"\nfont_size=20\n");
4992 size2 = efl_canvas_textblock_size_native_get(txt);
4993 ck_assert(size1.w < size2.w);
4994 ck_assert(size1.h < size2.h);
4995
4986 END_EFL_CANVAS_TEXTBLOCK_TEST(); 4996 END_EFL_CANVAS_TEXTBLOCK_TEST();
4987} 4997}
4988EFL_END_TEST 4998EFL_END_TEST