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.
15 for i in $(wildcard tests/ZDOTDIR*); do \
17 ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests; \
21 # Define targets for test files, with relative and abolute path.
22 # Use verbose output, which is useful with Vim's 'errorformat'.
23 TESTS:=$(wildcard tests/*.t)
25 uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
26 _TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
27 $(_TESTS_REL_AND_ABS):
28 cram --shell=zsh -v $@
29 .PHONY: $(_TESTS_REL_AND_ABS)