diff options
| author | Evgeny Kurnevsky <kurnevsky@gmail.com> | 2019-04-16 07:31:06 +0300 |
|---|---|---|
| committer | Evgeny Kurnevsky <kurnevsky@gmail.com> | 2019-04-16 07:31:06 +0300 |
| commit | 55e6cd937a4667cf867b8ecd05d5f63eb2e10d6e (patch) | |
| tree | bc99319665c53155d463b9bb4b0ec051b4cc4f16 /rust-mode-tests.el | |
| parent | d432409bdc210ec3fca8f5cf778bcf6814f5b121 (diff) | |
| download | rust-mode-55e6cd937a4667cf867b8ecd05d5f63eb2e10d6e.tar.gz | |
Add test for word boundaries for string ending with r.
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 13 |
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#\"; |
