From e6e16ccc21a64f4b333273f58a7bd6d0376f70f4 Mon Sep 17 00:00:00 2001 From: Micah Chalmer Date: Mon, 2 Feb 2015 20:37:16 -0500 Subject: 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 { -- cgit v1.2.3