From 5e77aedb27761d770e7e1a3b37875d3a4b0e932f Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 15 Aug 2015 00:20:40 +0100 Subject: Correcting highlighting of capitals in function names. Previously, code of the form: fn foo_Bar () {} would be incorrectly highlighted, because the regex matched on word boundaries rather than symbol boundaries. Test added. --- rust-mode-tests.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rust-mode-tests.el') diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 8f25f06..e621f82 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -979,6 +979,12 @@ list of substrings of `STR' each followed by its face." '("'\"'" font-lock-string-face "let" font-lock-keyword-face))) +(ert-deftest font-lock-fn-contains-capital () + (rust-test-font-lock + "fn foo_Bar() {}" + '("fn" font-lock-keyword-face + "foo_Bar" font-lock-function-name-face))) + (ert-deftest font-lock-single-quote-character-literal () (rust-test-font-lock "fn main() { let ch = '\\''; }" -- cgit v1.2.3