summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authormrBliss <dewinant@gmail.com>2016-04-24 12:23:18 +0200
committermrBliss <dewinant@gmail.com>2016-04-24 12:25:53 +0200
commitb971c6dd1c9356d4ace237c7e173dcbcb454a992 (patch)
treef27fdf39d4aa2041bce36909e07be5b1d7a7a37c /rust-mode-tests.el
parented0b390e11be6642085ae05a57aa9ceae63211c4 (diff)
downloadrust-mode-b971c6dd1c9356d4ace237c7e173dcbcb454a992.tar.gz
Fix #151
When looking for a `where` in `rust-rewind-to-beginning-of-current-level-expr`, check that it is not part of a string or comment.
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index de3900c..1e0207d 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -623,6 +623,17 @@ impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
}
"))
+(ert-deftest indent-align-where-in-comment ()
+ (test-indent
+ "/// - there must not exist an edge U->V in the graph where:
+#[derive(Clone, PartialEq, Eq)]
+pub struct Region { // <-- this should be flush with left margin!
+ entry: BasicBlockIndex,
+ leaves: BTreeMap<BasicBlockIndex, usize>,
+}
+"))
+
+
(ert-deftest indent-square-bracket-alignment ()
(test-indent
"