-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
34 lines (31 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Run tests
# use with update_screenshot=true to update the screenshots
# use with dir=... to test a particular dir under tests/
# use with file=... to test a particular file
# use with line=... to target a test at that line in the file
test:
nvim --headless --noplugin -u ./scripts/minimal_init.lua -l ./scripts/test_cli.lua
# launches test version of nvim that has the same plugin configuration as what the tests get
# this is useful sometiemes to check what is going on when child neovim processes just hang without any output
launch-test-nvim:
nvim --noplugin -u ./scripts/test_plugin_config.lua -c GrugFar
# clean / update all screenshots
update-screenshots:
rm -rf tests/screenshots/*
make test
# Download 'mini.nvim' to use its 'mini.test' testing module
prepare:
make clean
@mkdir -p deps
git clone --depth=1 --single-branch https://github.com/echasnovski/mini.nvim deps/mini.nvim
@mkdir -p temp_test_dir
@mkdir -p temp_history_dir
# clean up
clean:
rm -rf deps
rm -rf temp_test_dir
rm -rf temp_history_dir
# lint
lint:
selene lua tests
stylua --check lua tests