-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 860 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (23 loc) · 860 Bytes
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
.PHONY: test test-unit test-integration test-file lint format help
NVIM ?= nvim
PLENARY_OPTS ?= {minimal_init = 'test/minimal_init.lua'}
help:
@echo "make test | test-file FILE=... | test-integration LIVE_ROOTS='...' | lint | format"
test:
$(NVIM) --headless -i NONE -u test/minimal_init.lua -c "PlenaryBustedDirectory test/plenary/ $(PLENARY_OPTS)"
test-unit: test
test-integration:
ifndef LIVE_ROOTS
$(error LIVE_ROOTS is required; see test/live/README.md)
endif
node test/live/matrix.mjs $(LIVE_ROOTS)
test-file:
ifndef FILE
$(error FILE is required; e.g. test/plenary/lsp_spec.lua)
endif
$(NVIM) --headless -i NONE -u test/minimal_init.lua -c "PlenaryBustedFile $(FILE) $(PLENARY_OPTS)"
lint:
luacheck lua/ test/plenary/ --globals vim
stylua --check lua/ test/plenary/ test/live/run.lua
format:
stylua lua/ test/plenary/ test/live/run.lua