From 3995d330acd33f07a983df494f4515e8edf5fd80 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 30 Apr 2015 13:20:38 +0200 Subject: Add regression test for PR #52. Thanks again to @GBGamer ! --- rust-mode-tests.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'rust-mode-tests.el') diff --git a/rust-mode-tests.el b/rust-mode-tests.el index b94f041..bb40781 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -394,6 +394,32 @@ fn baz( a:int, // should work with a comment here { } ")) +(ert-deftest indent-open-after-arrow () + (test-indent + " +// Indent function body only one level after `-> {` +fn foo1(a:int, b:char) -> int { + let body; +} + +fn foo2(a:int, + b:char) -> int { + let body; +} + +fn foo3(a:int, + b:char) + -> int { + let body; +} + +fn foo4(a:int, + b:char) + -> int where int:A { + let body; +} +")) + (ert-deftest indent-square-bracket-alignment () (test-indent " -- cgit v1.2.3