summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-04-24 16:45:35 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-04-24 16:45:35 +0200
commitc0ee2b4968044533ab39a92569c39130115c1a2f (patch)
treec0f0243d3021eaf21f6d632ea4b3fd63e863af13 /tests
parent91bcfa8896d8a5e4175ddeeedff94045fd9fe6c8 (diff)
parentfa7e6ddb83699364fd4e35b43702926a55fadf82 (diff)
downloadredot-engine-c0ee2b4968044533ab39a92569c39130115c1a2f.tar.gz
Merge pull request #76145 from manueldun/usability-auto-indent
Fix auto-indentation in typed arrays, comments, and after colon
Diffstat (limited to 'tests')
-rw-r--r--tests/scene/test_code_edit.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index c681c76846..c5407d4bcd 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -2300,6 +2300,17 @@ TEST_CASE("[SceneTree][CodeEdit] indent") {
SEND_GUI_ACTION("ui_text_newline_blank");
CHECK(code_edit->get_line(0) == "test{}");
CHECK(code_edit->get_line(1) == "");
+
+ /* If there is something after a colon
+ and there is a colon in the comment it
+ should not indent. */
+ code_edit->add_comment_delimiter("#", "");
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:test#:");
+ SEND_GUI_ACTION("ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test:test#:");
+ CHECK(code_edit->get_line(1) == "");
+ code_edit->remove_comment_delimiter("#");
}
}