2017-11-22 15:27:35 +08:00
|
|
|
DOCKER = docker run -it --rm -v $(PWD):/testplugin -v $(PWD)/test:/test -v $(PWD)/build:/build "spacevim/vims"
|
|
|
|
|
|
|
|
ifeq ($(VIM),nvim)
|
|
|
|
DEFAULT_VIM:=$(DOCKER) neovim-stable
|
|
|
|
else
|
|
|
|
DEFAULT_VIM:=$(DOCKER) vim8
|
|
|
|
endif
|
|
|
|
|
2017-10-05 06:21:24 +08:00
|
|
|
test: build/vader | build
|
2017-11-22 15:27:35 +08:00
|
|
|
$(DEFAULT_VIM) -Nu test/vimrc -c 'Vader! test/**'
|
2017-10-05 06:21:24 +08:00
|
|
|
|
2017-10-08 00:43:32 +08:00
|
|
|
COVIMERAGE=$(shell command -v ccovimerage 2>/dev/null || echo build/covimerage/bin/covimerage)
|
|
|
|
|
|
|
|
test_coverage: $(COVIMERAGE) build/vader | build
|
2017-11-22 15:27:35 +08:00
|
|
|
$(COVIMERAGE) run $(DEFAULT_VIM) -Nu test/vimrc -c 'Vader! test/**'
|
2017-10-05 06:47:29 +08:00
|
|
|
|
|
|
|
build/covimerage:
|
|
|
|
virtualenv $@
|
2017-10-08 00:43:32 +08:00
|
|
|
build/covimerage/bin/covimerage: | build/covimerage
|
2017-10-15 21:51:46 +08:00
|
|
|
build/covimerage/bin/pip install covimerage
|
2017-10-05 06:47:29 +08:00
|
|
|
|
2017-10-05 06:21:24 +08:00
|
|
|
build/vader:
|
|
|
|
git clone --depth 1 https://github.com/junegunn/vader.vim.git $@
|
|
|
|
|
|
|
|
build:
|
|
|
|
mkdir -p $@
|
2017-10-05 06:47:40 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -r build
|
|
|
|
|
|
|
|
.PHONY: clean test
|