]> Sergey Matveev's repositories - zsh-autoenv.git/blob - Makefile
minor: doc
[zsh-autoenv.git] / Makefile
1 # Default, can be overridden using "make test ZDOTDIR=...".
2 ZDOTDIR:=${CURDIR}/tests/ZDOTDIR
3
4 # Export it, and make it absolute.
5 override export ZDOTDIR:=$(abspath $(ZDOTDIR))
6
7 test:
8         cram --shell=zsh -v tests
9
10 itest:
11         cram -i --shell=zsh tests
12
13 # Run tests with all ZDOTDIRs.
14 test_full:
15         for i in $(wildcard tests/ZDOTDIR*); do \
16                 echo "ZDOTDIR=$$i"; \
17                 ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests; \
18                 echo; \
19         done
20
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)
24
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)
30
31 .PHONY: itest test
32
33 clean:
34         $(RM) tests/*.err