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 <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11625
This commit is contained in:
Ali Alzyod 2020-04-03 16:11:24 +00:00 committed by Marcel Hollerbach
parent 8911f0a986
commit 5245bc03be
1 changed files with 12 additions and 0 deletions

View File

@ -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);