summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-10-08 20:39:24 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-10-10 08:30:23 +0800
commiteac9adf7a10b4162f2e9d438a2da4f6c5d7d458c (patch)
tree8c4aa521106fa89999845656c449512b2ebd41b5 /tests
parentca25c6e0a3f25948ee4a197f3442c66f019e7424 (diff)
Don't allow removing TextEdit's main caret
Diffstat (limited to 'tests')
-rw-r--r--tests/scene/test_text_edit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h
index 6b831bc9c7..3dfbd3e7b6 100644
--- a/tests/scene/test_text_edit.h
+++ b/tests/scene/test_text_edit.h
@@ -3321,6 +3321,11 @@ TEST_CASE("[SceneTree][TextEdit] muiticaret") {
CHECK(text_edit->get_caret_count() == 1);
CHECK(text_edit->get_caret_line(0) == 0);
CHECK(text_edit->get_caret_column(0) == 1);
+
+ ERR_PRINT_OFF;
+ text_edit->remove_caret(0);
+ CHECK(text_edit->get_caret_count() == 1);
+ ERR_PRINT_ON;
}
SUBCASE("[TextEdit] caret index edit order") {