bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5245bc03be0421e98e72deb5e1d2ddaeafae3c0f

commit 5245bc03be0421e98e72deb5e1d2ddaeafae3c0f
Author: Ali <[email protected]>
Date:   Fri Apr 3 16:11:24 2020 +0000

    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 <[email protected]>
    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);

-- 


Reply via email to