summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli <ali198724@gmail.com>2020-04-03 16:11:24 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-06 11:05:27 +0200
commit5245bc03be0421e98e72deb5e1d2ddaeafae3c0f (patch)
tree1ce9d1ffb0be8c2d32b2d8093c1106d139396c6a
parent8911f0a986ee96a74da557e71646cebecb852084 (diff)
downloadefl-5245bc03be0421e98e72deb5e1d2ddaeafae3c0f.tar.gz
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
-rw-r--r--src/tests/elementary/efl_ui_test_text.c12
1 files changed, 12 insertions, 0 deletions
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
@@ -30,6 +30,18 @@ EFL_START_TEST(text_cnp)
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);
efl_text_interactive_all_select(txt);
efl_ui_textbox_selection_cut(txt);
efl_ui_textbox_selection_paste(txt);