diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-04-30 22:27:25 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-04-30 22:27:25 +1000 |
| commit | 1be7a946ed1cce8a2e4c462af8003c628770fed4 (patch) | |
| tree | 7253a6208ae23cdad0fe677ff49804c4147d2a3e | |
| parent | 6d5b02e18a9c4ce327a15183ac1786d878acb646 (diff) | |
| parent | 3995d330acd33f07a983df494f4515e8edf5fd80 (diff) | |
| download | rust-mode-1be7a946ed1cce8a2e4c462af8003c628770fed4.tar.gz | |
Merge pull request #57 from pnkfelix/regression-test-for-arrow-openbrace
Add regression test for PR #52.
| -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 " |
