Skip to content

Commit 192fa47

Browse files
committed
add tests
1 parent 73ed57b commit 192fa47

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/elixir-mode-font-test.el

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,31 @@ _1_day"
579579
(should (eq (elixir-test-face-at 2) 'font-lock-comment-face))
580580
(should (eq (elixir-test-face-at 19) 'font-lock-comment-face))))
581581

582+
(ert-deftest elixir-mode-syntax-table/arrows ()
583+
:tags '(fontification syntax-table)
584+
585+
(elixir-test-with-temp-buffer
586+
"with {:ok, _} <- SomeModule.call(),
587+
:ok <- OtherModule.call() do
588+
:ok
589+
end"
590+
(should (eq (elixir-test-face-at 15) 'font-lock-keyword-face))
591+
(should (eq (elixir-test-face-at 50) 'font-lock-keyword-face)))
592+
593+
(elixir-test-with-temp-buffer
594+
"%{
595+
\"\"foo\"\" => \"bar\"
596+
}"
597+
(should (eq (elixir-test-face-at 18) 'font-lock-keyword-face)))
598+
599+
(elixir-test-with-temp-buffer
600+
"[] |> IO.inspect()"
601+
(should (eq (elixir-test-face-at 4) 'font-lock-keyword-face)))
602+
603+
(elixir-test-with-temp-buffer
604+
"a = fn x -> x end"
605+
(should (eq (elixir-test-face-at 10) 'font-lock-keyword-face))))
606+
582607
(ert-deftest elixir-mode-in-docstring ()
583608
"https://github.com/elixir-editors/emacs-elixir/issues/355"
584609
:tags 'fontification

0 commit comments

Comments
 (0)