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 zsh in zsh /opt/zsh4/bin/zsh; do \
16 command -v $$zsh || { echo "Skipping non-existing shell: $$zsh"; continue; }; \
18 for i in $(wildcard tests/ZDOTDIR*); do \
19 echo "zsh=$zsh ZDOTDIR=$$i"; \
20 SHELL=$$zsh ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests || ret=$$?; \
26 # Define targets for test files, with relative and abolute path.
27 # Use verbose output, which is useful with Vim's 'errorformat'.
28 TESTS:=$(wildcard tests/*.t)
30 uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
31 _TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
32 $(_TESTS_REL_AND_ABS):
33 cram --shell=zsh -v $@
34 .PHONY: $(_TESTS_REL_AND_ABS)