Skip to content

Commit cdcefa0

Browse files
committed
Add tests for highlighting-related issues.
1 parent 9def36a commit cdcefa0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/elixir-mode-font-tests.el

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,20 @@ buffer."
5555
"~r/\"/
5656
x = 15"
5757
(should (eq (elixir-test-face-at 7) 'font-lock-variable-name-face))))
58+
59+
(ert-deftest elixir-mode-syntax-table/fontify-regex-with-question/1 ()
60+
"https://github.com/elixir-lang/emacs-elixir/issues/36"
61+
:tags '(fontification syntax-table)
62+
(elixir-test-with-temp-buffer
63+
"~r/^matt: (?<ct>\d+)$/mg
64+
x = 15"
65+
(should (eq (elixir-test-face-at 4) 'font-lock-string-face))
66+
(should (eq (elixir-test-face-at 25) 'font-lock-variable-name-face))))
67+
68+
(ert-deftest elixir-mode-syntax-table/fontify-regex-with-question/2 ()
69+
"https://github.com/elixir-lang/emacs-elixir/issues/29"
70+
:tags '(fontification syntax-table)
71+
(elixir-test-with-temp-buffer
72+
"a = \"\" <> \"?\"
73+
x = 15"
74+
(should (eq (elixir-test-face-at 15) 'font-lock-variable-name-face))))

0 commit comments

Comments
 (0)