Skip to content

Commit e6e16cc

Browse files
committed
Add test for closing braces in character literals
1 parent 9c0846a commit e6e16cc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rust-mode-tests.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,18 @@ fn foo() {
526526
"
527527
))
528528

529+
;; Closing braces in single char literals and strings should not confuse the indentation
530+
(ert-deftest indent-closing-braces-in-char-literals ()
531+
(test-indent
532+
"
533+
fn foo() {
534+
{ bar('}'); }
535+
{ bar(']'); }
536+
{ bar(')'); }
537+
}
538+
"
539+
))
540+
529541
(setq rust-test-motion-string
530542
"
531543
fn fn1(arg: int) -> bool {

0 commit comments

Comments
 (0)