Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(tests): remove duplicated tests #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:

jobs:
test:
name: mix test (Emacs ${{matrix.emacs_version}} | Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
name: test (Emacs ${{matrix.emacs_version}} | Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version: ['27.1', '26.3', '25.2']
otp: ['22.3', '23.2', '24.2']
elixir: ['1.9.4', '1.11.4', '1.13.1']
emacs_version: ['27.2', '26.3', '25.3', 'snapshot']
otp: ['23.3']
elixir: ['1.9.4', '1.11.4', '1.13.3']

steps:
- name: Setup Emacs
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ Alternatively, if you want to use `ruby-end-mode`, you can add the following to
(ruby-end-mode +1)))
```

## Notes

This package is tested only with a single version of OTP and 3 versions of Elixir. Please, always report versions
(Emacs, Elixir and Erlang/OTP) when raising issues.

## Elixir Tooling Integration

If you looking for elixir tooling integration for Emacs, check: [alchemist.el](https://github.com/tonini/alchemist.el)
Expand Down
82 changes: 3 additions & 79 deletions tests/elixir-mode-helper-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ defmodule Module.Name do

end")
(goto-line 7)
(elixir-smie--heredoc-at-current-point-p)))
(elixir-smie--heredoc-at-current-point-p)
))
(should (not (with-temp-buffer
(elixir-mode)
(insert "
Expand All @@ -44,8 +45,7 @@ defmodule Module.Name do
end
end")
(goto-line 4)
(elixir-smie--previous-line-indentation))))
)
(elixir-smie--previous-line-indentation)))))


(ert-deftest check-if-previous-line-blank ()
Expand Down Expand Up @@ -73,82 +73,6 @@ end")
(goto-line 4)
(elixir-smie--previous-line-empty-p))))


;;; elixir-mode-helper-test.el --- Tests for helper functions

;;; Code:

(ert-deftest check-if-currently-inside-heredoc ()
(should (with-temp-buffer
(elixir-mode)
(insert "
defmodule Module.Name do

@moduledoc \"\"\"
## Examples

....
\"\"\"

end")
(goto-line 7)
(elixir-smie--heredoc-at-current-point-p)))
(should (not (with-temp-buffer
(elixir-mode)
(insert "
defmodule Module.Name do

@moduledoc \"\"\"
## Examples

....
\"\"\"

end")
(goto-line 3)
(elixir-smie--heredoc-at-current-point-p)))))

(ert-deftest get-previous-line-indentation ()
(should (equal 2
(with-temp-buffer
(elixir-mode)
(insert "
defmodule Module.Name do
def what do
1 + 1
end
end")
(goto-line 4)
(elixir-smie--previous-line-indentation))))
)


(ert-deftest check-if-previous-line-blank ()
(should (not (with-temp-buffer
(elixir-mode)
(insert "
defmodule Module.Name do

def what do
1 + 1
end
end")
(goto-line 3)
(elixir-smie--previous-line-empty-p))))
(should (with-temp-buffer
(elixir-mode)
(insert "
defmodule Module.Name do


def what do
1 + 1
end
end")
(goto-line 4)
(elixir-smie--previous-line-empty-p))))


(ert-deftest test-current-line-contains-built-in-keyword ()
(should (not (with-temp-buffer
(elixir-mode)
Expand Down