diff options
| author | Georg Brandl <georg@python.org> | 2016-02-14 10:44:51 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2016-02-14 10:44:55 +0100 |
| commit | 304ae4bab477873b3e5a9898728210667c62738a (patch) | |
| tree | c008198e0f89ed8133f5b2c8f914a0f97f137c26 /rust-mode-tests.el | |
| parent | fa5b38feac9c5b4da7427b97832b813e20b8e276 (diff) | |
| download | rust-mode-304ae4bab477873b3e5a9898728210667c62738a.tar.gz | |
Change font-lock face for module names.
Use font-lock-constant-face instead of font-lock-type-face. Especially in paths, this
tones down the importance of the path prefix, and makes the suffix more visible.
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 8375d35..8390ab6 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -1422,16 +1422,34 @@ this_is_not_a_string();)" "\"/*! doc */\"" '("\"/*! doc */\"" font-lock-string-face))) -(ert-deftest font-lock-module () +(ert-deftest font-lock-module-def () + (rust-test-font-lock + "mod foo;" + '("mod" font-lock-keyword-face + "foo" font-lock-constant-face))) + +(ert-deftest font-lock-module-use () + (rust-test-font-lock + "use foo;" + '("use" font-lock-keyword-face + "foo" font-lock-constant-face))) + +(ert-deftest font-lock-module-path () (rust-test-font-lock "foo::bar" - '("foo" font-lock-type-face))) + '("foo" font-lock-constant-face))) -(ert-deftest font-lock-submodule () +(ert-deftest font-lock-submodule-path () (rust-test-font-lock "foo::bar::baz" - '("foo" font-lock-type-face - "bar" font-lock-type-face))) + '("foo" font-lock-constant-face + "bar" font-lock-constant-face))) + +(ert-deftest font-lock-type () + (rust-test-font-lock + "foo::Bar::baz" + '("foo" font-lock-constant-face + "Bar" font-lock-type-face))) (ert-deftest font-lock-type-annotation () "Ensure type annotations are not confused with modules." |
