[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/elixir-mode 192fa47f91 2/3: add tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/elixir-mode 192fa47f91 2/3: add tests |
Date: |
Wed, 10 Aug 2022 23:58:21 -0400 (EDT) |
branch: elpa/elixir-mode
commit 192fa47f914bd914e4cbd3a3a264d6e7f290d16b
Author: mpanarin <mykhailopanarin@gmail.com>
Commit: mpanarin <mykhailopanarin@gmail.com>
add tests
---
tests/elixir-mode-font-test.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/elixir-mode-font-test.el b/tests/elixir-mode-font-test.el
index 1306b3f79a..8d3e539ced 100644
--- a/tests/elixir-mode-font-test.el
+++ b/tests/elixir-mode-font-test.el
@@ -579,6 +579,31 @@ _1_day"
(should (eq (elixir-test-face-at 2) 'font-lock-comment-face))
(should (eq (elixir-test-face-at 19) 'font-lock-comment-face))))
+(ert-deftest elixir-mode-syntax-table/arrows ()
+ :tags '(fontification syntax-table)
+
+ (elixir-test-with-temp-buffer
+ "with {:ok, _} <- SomeModule.call(),
+ :ok <- OtherModule.call() do
+ :ok
+ end"
+ (should (eq (elixir-test-face-at 15) 'font-lock-keyword-face))
+ (should (eq (elixir-test-face-at 50) 'font-lock-keyword-face)))
+
+ (elixir-test-with-temp-buffer
+ "%{
+ \"\"foo\"\" => \"bar\"
+ }"
+ (should (eq (elixir-test-face-at 18) 'font-lock-keyword-face)))
+
+ (elixir-test-with-temp-buffer
+ "[] |> IO.inspect()"
+ (should (eq (elixir-test-face-at 4) 'font-lock-keyword-face)))
+
+ (elixir-test-with-temp-buffer
+ "a = fn x -> x end"
+ (should (eq (elixir-test-face-at 10) 'font-lock-keyword-face))))
+
(ert-deftest elixir-mode-in-docstring ()
"https://github.com/elixir-editors/emacs-elixir/issues/355"
:tags 'fontification