-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathMakefile
33 lines (28 loc) · 814 Bytes
/
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
.PHONY: all
all: dev test
TEST_PATH := $(if $(TEST_PATH),$(TEST_PATH),lua/diffview/tests/)
export TEST_PATH
# Usage:
# Run all tests:
# $ make test
#
# Run tests for a specific path:
# $ TEST_PATH=tests/some/path make test
.PHONY: test
test:
nvim --headless -i NONE -n -u scripts/test_init.lua -c \
"PlenaryBustedDirectory $(TEST_PATH) { minimal_init = './scripts/test_init.lua' }"
.PHONY: dev
dev: .dev/lua/nvim
.dev/lua/nvim:
mkdir -p "$@"
git clone --filter=blob:none https://github.com/folke/neodev.nvim.git "$@/repo"
cd "$@/repo" && git -c advice.detachedHead=false checkout ce9a2e8eaba5649b553529c5498acb43a6c317cd
cp "$@/repo/types/nightly/uv.lua" \
"$@/repo/types/nightly/cmd.lua" \
"$@/repo/types/nightly/alias.lua" \
"$@/"
rm -rf "$@/repo"
.PHONY: clean
clean:
rm -rf .tests .dev