1 # Default, can be overridden using "make test ZDOTDIR=...".
2 ZDOTDIR:=${CURDIR}/tests/ZDOTDIR
4 # Export it, and make it absolute.
5 override export ZDOTDIR:=$(abspath $(ZDOTDIR))
8 cram --shell=zsh -v tests
11 cram -i --shell=zsh tests
13 # Run tests with all ZDOTDIRs.
16 for i in $(wildcard tests/ZDOTDIR*); do \
18 ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests || ret=$$?; \
23 # Define targets for test files, with relative and abolute path.
24 # Use verbose output, which is useful with Vim's 'errorformat'.
25 TESTS:=$(wildcard tests/*.t)
27 uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
28 _TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
29 $(_TESTS_REL_AND_ABS):
30 cram --shell=zsh -v $@
31 .PHONY: $(_TESTS_REL_AND_ABS)