diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-04-30 13:20:38 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-04-30 13:20:38 +0200 |
| commit | 3995d330acd33f07a983df494f4515e8edf5fd80 (patch) | |
| tree | 81b23586a5496dc7c30baaed25bdbaada84cd456 /rust-mode-tests.el | |
| parent | 493cc99ecad9ee1890007c69d2b500156a78ceeb (diff) | |
| download | rust-mode-3995d330acd33f07a983df494f4515e8edf5fd80.tar.gz | |
Add regression test for PR #52.
Thanks again to @GBGamer !
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 26 |
1 files changed, 26 insertions, 0 deletions
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 " |
