summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorFelix S Klock II <pnkfelix@pnkfx.org>2015-02-07 12:42:37 +0100
committerFelix S Klock II <pnkfelix@pnkfx.org>2015-02-07 12:42:37 +0100
commit19bc0e9ef1dd72bfde10644037a13719a38777fc (patch)
treeafe6a39707abab13a82a859e397649cad1d29eea /rust-mode-tests.el
parentd2c6d6c3b1a4fb711528535574c9e035ac1482b2 (diff)
parent2038365705131ce73c4511e886f2896fa83b01c4 (diff)
downloadrust-mode-19bc0e9ef1dd72bfde10644037a13719a38777fc.tar.gz
Merge pull request #30 from MicahChalmer/emacs23-fixup
Emacs 23 Fixups
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index a0e27b0..36e59df 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -289,7 +289,11 @@ very very very long string
(rust-test-manip-code
deindented
1
- (lambda () (indent-region 1 (buffer-size)))
+ (lambda ()
+ ;; The indentation will fial in some cases if the syntax properties are
+ ;; not set. This only happens when font-lock fontifies the buffer.
+ (font-lock-fontify-buffer)
+ (indent-region 1 (buffer-size)))
indented)))
@@ -1008,3 +1012,12 @@ fn main() {
}
"
)))
+
+(ert-deftest indent-method-chains-after-comment ()
+ (let ((rust-indent-method-chain t)) (test-indent
+ "
+fn main() { // comment here should not push next line out
+ foo.bar()
+}
+"
+ )))