branch: elpa/rust-mode
commit e6e16ccc21a64f4b333273f58a7bd6d0376f70f4
Author: Micah Chalmer <[email protected]>
Commit: Micah Chalmer <[email protected]>
Add test for closing braces in character literals
---
rust-mode-tests.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index f4512f4..2b18728 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -526,6 +526,18 @@ fn foo() {
"
))
+;; Closing braces in single char literals and strings should not confuse the
indentation
+(ert-deftest indent-closing-braces-in-char-literals ()
+ (test-indent
+ "
+fn foo() {
+ { bar('}'); }
+ { bar(']'); }
+ { bar(')'); }
+}
+"
+ ))
+
(setq rust-test-motion-string
"
fn fn1(arg: int) -> bool {