summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 72a9e4e..b21202a 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -1452,6 +1452,19 @@ fn g() {
"g" font-lock-function-name-face
"\"xs\"" font-lock-string-face)))
+(ert-deftest font-lock-string-ending-with-r-word-boundary ()
+ (with-temp-buffer
+ (rust-mode)
+ (insert "const foo = \"foo bar\"")
+ (font-lock-fontify-buffer)
+ ;; right-word should move the point to the end of the words.
+ (goto-char 14)
+ (right-word)
+ (should (equal 17 (point)))
+ (right-word)
+ (should (equal 21 (point)))
+ ))
+
(ert-deftest font-lock-raw-string-trick-ending-followed-by-string-with-quote ()
(rust-test-font-lock
"r\"With what looks like the start of a raw string at the end r#\";