summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Chalmer <micah@micahchalmer.net>2015-02-02 20:37:16 -0500
committerMicah Chalmer <micah@micahchalmer.net>2015-02-02 20:37:16 -0500
commite6e16ccc21a64f4b333273f58a7bd6d0376f70f4 (patch)
treee46510bcb857f56132575cfc0209cbee22d1485a
parent9c0846aa4580685b343921a7eefb0ccfd3f0633e (diff)
downloadrust-mode-e6e16ccc21a64f4b333273f58a7bd6d0376f70f4.tar.gz
Add test for closing braces in character literals
-rw-r--r--rust-mode-tests.el12
1 files changed, 12 insertions, 0 deletions
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 {