summaryrefslogtreecommitdiff
path: root/tests/scene
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2022-10-09 17:46:40 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2022-10-09 17:46:40 +0100
commit7333aa68f4fbc8a47dc7d3076acc13898aad97aa (patch)
treeca36a4550dcb8ffe62b87ba20a7ffff569b9dece /tests/scene
parent880a0177d12463b612268afe95bd3d8dd565bf52 (diff)
Handle tab in TextEdit
Diffstat (limited to 'tests/scene')
-rw-r--r--tests/scene/test_text_edit.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h
index 6b831bc9c7..f0e6d2b20d 100644
--- a/tests/scene/test_text_edit.h
+++ b/tests/scene/test_text_edit.h
@@ -2944,6 +2944,18 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_CHECK("lines_edited_from", lines_edited_args);
text_edit->set_overtype_mode_enabled(false);
CHECK_FALSE(text_edit->is_overtype_mode_enabled());
+
+ lines_edited_args.remove_at(0);
+ lines_edited_args.remove_at(1);
+
+ SEND_GUI_KEY_EVENT(text_edit, Key::TAB);
+ CHECK(text_edit->get_viewport()->is_input_handled());
+ CHECK(text_edit->get_text() == "A\tB\nA\tB");
+ CHECK(text_edit->get_caret_column() == 2);
+ CHECK(text_edit->get_caret_column(1) == 2);
+ SIGNAL_CHECK("caret_changed", empty_signal_args);
+ SIGNAL_CHECK("text_changed", empty_signal_args);
+ SIGNAL_CHECK("lines_edited_from", lines_edited_args);
}
SIGNAL_UNWATCH(text_edit, "text_set");