emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 55e6cd9 392/486: Add test for word boundaries fo


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 55e6cd9 392/486: Add test for word boundaries for string ending with r.
Date: Sat, 7 Aug 2021 09:26:00 -0400 (EDT)

branch: elpa/rust-mode
commit 55e6cd937a4667cf867b8ecd05d5f63eb2e10d6e
Author: Evgeny Kurnevsky <kurnevsky@gmail.com>
Commit: Evgeny Kurnevsky <kurnevsky@gmail.com>

    Add test for word boundaries for string ending with r.
---
 rust-mode-tests.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

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#\";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]