diff options
| author | Micah Chalmer <micah@micahchalmer.net> | 2015-07-07 23:13:01 -0400 |
|---|---|---|
| committer | Micah Chalmer <micah@micahchalmer.net> | 2015-07-07 23:13:01 -0400 |
| commit | 88ff62ad3181d9976c9f435efa614b422037af51 (patch) | |
| tree | 9051c90a56e89757f3543046563ee53060d2144c /rust-mode-tests.el | |
| parent | 102ad5f5a53e6147e21e7737b861808874b1a04b (diff) | |
| download | rust-mode-88ff62ad3181d9976c9f435efa614b422037af51.tar.gz | |
Remove unnecessary code with call to undefined function
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 4a6cf20..5312f38 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -2168,6 +2168,35 @@ type Foo<T> where T: Copy = Box<T>; '((10 11)) '(7 9)))) + +(ert-deftest font-lock-extend-region-in-string () + + (with-temp-buffer + (rust-mode) + (insert " +fn foo() { + let x = r\" +Fontification needs to include this whole string or none of it. + \" +}") + (font-lock-fontify-buffer) + (let ((font-lock-beg 13) + (font-lock-end 42)) + (rust-font-lock-extend-region) + (should (<= font-lock-beg 13)) + (should (>= font-lock-end 106)) + ) + (let ((font-lock-beg 42) + (font-lock-end 108)) + (rust-font-lock-extend-region) + (should (<= font-lock-beg 25)) + (should (>= font-lock-end 108))) + (let ((font-lock-beg 1) + (font-lock-end 12)) + (rust-font-lock-extend-region) + (should (<= font-lock-beg 1)) + (should (>= font-lock-end 12))))) + ;; If electric-pair-mode is available, load it and run the tests that use it. If not, ;; no error--the tests will be skipped. (require 'elec-pair nil t) |
