-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f88600
commit b14000a
Showing
9 changed files
with
50 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
# we disable the `all` command because some external tool might run it automatically | ||
# disable the `all` command because some external tool might run it automatically | ||
.SUFFIXES: | ||
.PHONY: deps | ||
|
||
all: | ||
|
||
# runs all the test files. | ||
test: | ||
nvim --version | head -n 1 && echo '' | ||
echo "CWD:" && pwd && echo "" | ||
nvim --version | head -n 1 && echo "" | ||
nvim --headless --noplugin -u ./scripts/minimal_init.lua \ | ||
-c "lua MiniTest.run({ execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 1 }) } })" | ||
-c "lua print('Runtime path is:')" \ | ||
-c "lua print(vim.inspect(vim.opt.runtimepath:get()) .. '\n')" \ | ||
-c "lua require('mini.test').setup()" \ | ||
-c "lua require('salesforce').setup()" \ | ||
-c "lua print(vim.inspect(require('salesforce.config'):get_options()) .. '\n')" \ | ||
-c "lua print(type(MiniTest) .. '\n')" \ | ||
-c "lua MiniTest.run({ execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 1 }) }, script_path = 'scripts/minitest.lua' })" | ||
|
||
test-debug: | ||
export DEBUG=true && $(MAKE) test | ||
|
||
# installs `mini.nvim`, used for both the tests and documentation. | ||
deps: | ||
@mkdir -p deps | ||
@test -d deps/mini.nvim || git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim | ||
@test -d deps/plenary.nvim || git clone --depth 1 https://github.com/nvim-lua/plenary.nvim.git deps/plenary.nvim | ||
@test -d deps/nvim-treesitter || git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter.git deps/nvim-treesitter | ||
|
||
# installs deps before running tests, useful for the CI. | ||
test-ci: deps test | ||
|
||
# generates the documentation. | ||
# generates the documentation | ||
documentation: | ||
nvim --headless --noplugin -u ./scripts/minimal_init.lua -c "lua require('mini.doc').generate()" -c "qa!" | ||
|
||
# installs deps before running the documentation generation, useful for the CI. | ||
documentation-ci: deps documentation | ||
|
||
# performs a lint check and fixes issue if possible, following the config in `stylua.toml`. | ||
lint: | ||
stylua . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
local minitest = require("mini.test") | ||
|
||
---@diagnostic disable-next-line: undefined-field | ||
if _G.MiniTest == nil then | ||
minitest.setup() | ||
end | ||
minitest.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters