diff options
| author | Micah Chalmer <micah@micahchalmer.net> | 2016-02-16 20:34:33 -0500 |
|---|---|---|
| committer | Micah Chalmer <micah@micahchalmer.net> | 2016-02-16 20:34:33 -0500 |
| commit | b1cca0fa73633dcee5704423d9421bfccf12385d (patch) | |
| tree | cfe3e11b9c8eaf65ee89b1c43eea6140322bd79a /rust-mode-tests.el | |
| parent | ae4938076ee20c2636089f285465263bcbd9fd16 (diff) | |
| parent | 304ae4bab477873b3e5a9898728210667c62738a (diff) | |
| download | rust-mode-b1cca0fa73633dcee5704423d9421bfccf12385d.tar.gz | |
Merge pull request #72 from birkenfeld/builtin-face
Change font-lock face for module paths
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." |
