From 5245bc03be0421e98e72deb5e1d2ddaeafae3c0f Mon Sep 17 00:00:00 2001 From: Ali Date: Fri, 3 Apr 2020 16:11:24 +0000 Subject: efl.ui.textbox: add test case for copy/paste results since paste is now working when called from user source code, this test case can be added Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11625 --- src/tests/elementary/efl_ui_test_text.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tests/elementary/efl_ui_test_text.c b/src/tests/elementary/efl_ui_test_text.c index 63df0e70f6..dd77472c33 100644 --- a/src/tests/elementary/efl_ui_test_text.c +++ b/src/tests/elementary/efl_ui_test_text.c @@ -27,6 +27,18 @@ EFL_START_TEST(text_cnp) efl_event_callback_add(efl_added, EFL_UI_TEXTBOX_EVENT_SELECTION_CUT, increment_int_changed, &i_cut) ); + efl_text_set(txt, "Hello"); + efl_text_interactive_all_select(txt); + efl_ui_textbox_selection_copy(txt); + efl_text_interactive_all_unselect(txt); + efl_text_cursor_text_insert(efl_text_interactive_main_cursor_get(txt), "X"); + efl_ui_textbox_selection_paste(txt); + ecore_main_loop_iterate(); + ck_assert_int_eq(i_copy, 1); + ck_assert_int_eq(i_paste, 1); + ck_assert_str_eq(efl_text_get(txt), "HelloXHello"); + + i_copy = i_cut = i_paste= 0; efl_text_set(txt, "Hello"); efl_text_interactive_all_select(txt); efl_ui_textbox_selection_copy(txt); -- cgit v1.2.1