summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
AgeCommit message (Collapse)Author
2015-02-15Include the last character in indentation testsMicah Chalmer
2015-02-15Don't set syntax-begin-functionMicah Chalmer
2015-02-10Add test for raw string with inner quote and hashMicah Chalmer
2015-02-10Fix raw string bugsMicah Chalmer
2015-02-07Fix typo in commentMicah Chalmer
2015-02-07Highlight raw strings correctlyMicah Chalmer
2015-02-06Fix bug in rust-indent-method-chainsMicah Chalmer
2015-02-06Make features (and their tests) work on emacs 23Micah Chalmer
2015-02-06Merge pull request #22 from nikomatsakis/align-method-chainFelix S Klock II
Fix aligning of method chains (more-or-less), add various unit tests, and add matching angle brackets.
2015-02-06Merge pull request #16 from MicahChalmer/add-travisNiko Matsakis
Add travis config (and make tests runnable on emacs 23)
2015-02-05Fix aligning of method chains (more-or-less) and add various unit tests.Niko Matsakis
The regular expressions are probably kind of wrong for things like self.foo.something::<X>() .more();
2015-02-03Use old code style for emacs 23 compatMicah Chalmer
The new recommended style is to use the "cl-" prefixed versions, but they do not exist in emacs 23. We still want to stay compatible with that, so use plain "loop" rather than "cl-loop" to allow the tests to work with both old and new versions. ALso "pcase" was introduced in emacs 24, so stop using it to remain compatible with emacs 23.
2015-02-02Add test for closing braces in character literalsMicah Chalmer
2015-02-02Add test for '\'' single quote char literalMicah Chalmer
2015-02-02Fix syntax and highlighting for char literalsMicah Chalmer
This uses syntax properties to make it so that emacs recognizes the single quote, rather than the double quote, as the string delimiter within character literals, while leaving the syntax unchanged elsewhere.
2015-02-02Fix tests broken by trailing whitespace removalMicah Chalmer
Commit a8fad0f broke the ERT tests by removing trailing whitespace inside the test strings. Fix the tests, and replace some line endings inside strings with explicit "\n" to avoid having further significant trailing whitespace in the code.
2014-10-25Fix spelling mistakes in comments.Joseph Crail
2014-09-29Replaced some TODO by FIXMEgamazeps
closes #17478
2014-06-17emacs: Remove outdated references to ~ in testsTom Jakubowski
2014-06-17emacs: Don't overwrite font lock for attributesTom Jakubowski
This addresses the font lock regression introduced by the earlier pull request #14818 - attributes are no longer be highligted inside of comments and strings. Also add some font lock test infrastructure and some tests for attribute font locking.
2014-03-12Emacs: always jump the cursor if needed on indentMicah Chalmer
The rust-mode-indent-line function had a check, which ran after all the calculations for how to indent had already happened, that skipped actually performing the indent if the line was already at the right indentation. Because of that, the cursor did not jump to the indentation if the line wasn't changing. This was particularly annoying if there was nothing but spaces on the line and you were at the beginning of it--it looked like the indent just wasn't working. This removes the check and adds test cases to cover this.
2014-02-22Fix typo in emacs ERT testMicah Chalmer
2014-02-22Emacs: indent relative to enclosing blockMicah Chalmer
This changes the indent to calculate positions relative to the enclosing block (or braced/parenthesized expression), rather than by an absolute nesting level within the whole file. This allows things like this to work: let x = match expr { Pattern => ... } With the old method, only one level of nesting would be added within the match braces, so "Pattern" would have ended up aligned with the match. The other change is that multiple parens/braces on the same line only increase the indent once. This is a very common case for passing closures/procs. The absolute nesting method would do this: spawn(proc() { // Indented out two indent levels... }) whereas the code in this commit does this: spawn(proc() { // Indented out only one level... })
2014-02-22Emacs: stay at the correct position when indentingMicah Chalmer
When indenting a non-blank line, stay at the same cursor position relative to the content after indenting.
2014-02-22Fix emacs indentation of multi-line match patternsMicah Chalmer
Aligns to the same column if the previous line ends in a single '|' (but not a '||').
2013-12-09Add defun motions for rust-mode.S Pradeep Kumar
Specifically, we can now use: + beginning-of-defun + end-of-defun + mark-defun where "defun" means a Rust item. + Add tests in rust-mode-tests.el + Fix indentation in rust-mode-tests.el + Add support for trait to Imenu
2013-09-28Fix single-line-style paragraph fills with code immediately before or afterMicah Chalmer
2013-09-07Cover all cases for padding in paragraph fills as intendedMicah Chalmer
2013-09-07Fix regression of multi-line statement indentsMicah Chalmer
2013-09-06Add ERT testsMicah Chalmer