From eac9adf7a10b4162f2e9d438a2da4f6c5d7d458c Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 8 Oct 2022 20:39:24 +0800 Subject: Don't allow removing TextEdit's main caret --- tests/scene/test_text_edit.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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") { -- cgit v1.2.3