From 55e6cd937a4667cf867b8ecd05d5f63eb2e10d6e Mon Sep 17 00:00:00 2001 From: Evgeny Kurnevsky Date: Tue, 16 Apr 2019 07:31:06 +0300 Subject: Add test for word boundaries for string ending with r. --- rust-mode-tests.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'rust-mode-tests.el') 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#\"; -- cgit v1.2.3