All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
6 - [`test/unit`](./unit): Unit tests
7 - [`test/unit/test.vimspec`](./unit/test.vimspec): Unit test cases
8 - [`test/unit/runtime`](./unit/runtime): Runtime directory loaded on running unit tests. They mocks several external APIs like `ale#*` or `lsp#*`
9 - [`test/integ`](./integ): Integration tests
10 - [`test/integ/test.vimspec`](./integ/test.vimspec): Integration test cases
11 - [`test/integ/deps`](./integ/deps): Dependant plugins
15 Unit tests confirm vim-lsp-ale works as intended.
19 Unit tests can be run with no dependency because they mock every external API.
21 [vim-themis](https://github.com/thinca/vim-themis) is used as test runner.
23 By default, it runs tests with `vim` command. When running tests with Neovim, set `THEMIS_VIM=nvim` environment variable.
28 cd path/to/vim-lsp-ale
29 git clone https://github.com/thinca/vim-themis.git
32 ./vim-themis/bin/themis ./test/unit/
34 # Run tests with NeoVim
35 THEMIS_VIM=nvim ./vim-themis/bin/themis ./test/unit/
38 ### Measure unit test coverage
40 [covimerage](https://github.com/Vimjas/covimerage) is used to measure test coverage. Install it by `pip install covimerage`.
42 Set a file path to `THEMIS_PROFILE` environment variable and run unit tests. Vim will store the profile data to the file.
43 `covimerage` command will convert the profile data into coverage data for `coverage` command provided by Python.
46 cd path/to/vim-lsp-ale
47 git clone https://github.com/thinca/vim-themis.git
49 # Run test case with $THEMIS_PROFILE environment variable
50 THEMIS_PROFILE=profile.txt ./vim-themis/bin/themis ./test/unit
52 # Store coverage data at .coverage_covimerage converted from the profile data
53 covimerage write_coverage profile.txt
55 # Show coverage report by `coverage` command
61 Integration tests confirm integrity among vim-lsp, ALE, vim-lsp-ale and a language server.
65 Integration tests require all dependencies are installed in [deps](./integ/deps) directory.
68 cd path/to/vim-lsp-ale
69 git clone https://github.com/prabirshrestha/vim-lsp.git test/integ/deps/vim-lsp
70 git clone https://github.com/dense-analysis/ale.git test/integ/deps/ale
73 [rust-analyzer](https://rust-analyzer.github.io/) is used as language server to run integration tests.
74 Download the binary following [the instruction](https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary)
75 and put the binary in `$PATH` directory.
77 And [vim-themis](https://github.com/thinca/vim-themis) is used as test runner.
79 Note that integration tests were not confirmed on Windows.
81 ### Run integration tests
84 cd path/to/vim-lsp-ale
85 git clone https://github.com/thinca/vim-themis.git
86 ./vim-themis/bin/themis ./test/integ/
91 When some integration tests fail, the following log files would be useful to investigate the failure.
93 - `test/integ/integ_messages.txt`: Messages in `:message` area while running the tests
94 - `test/integ/lsp-log.txt`: Log information of vim-lsp. It records communications between vim-lsp and a language server
98 Tests are run continuously on GitHub Actions.
100 https://github.com/rhysd/vim-lsp-ale/actions?query=workflow%3ACI
102 - Unit tests are run on Linux, macOS and Windows with Vim and Neovim
103 - Integration tests are run on Linux with Vim and Neovim