]> Sergey Matveev's repositories - zsh-autoenv.git/blob - Makefile
tests: setup for multiple ZDOTDIRs, fix/add "setopt clobber"
[zsh-autoenv.git] / Makefile
1 export ZDOTDIR=${PWD}/tests/ZDOTDIR
2
3 test:
4         cram --shell=zsh -v tests
5
6 itest:
7         cram -i --shell=zsh tests
8
9 # Run tests with all ZDOTDIRs.
10 test_full:
11         for i in $(wildcard tests/ZDOTDIR*); do \
12                 echo "ZDOTDIR=$$i"; \
13                 ZDOTDIR=${PWD}/$$i cram --shell=zsh -v tests; \
14         done
15
16 # Define targets for test files, with relative and abolute path.
17 # Use verbose output, which is useful with Vim's 'errorformat'.
18 TESTS:=$(wildcard tests/*.t)
19
20 uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
21 _TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
22 $(_TESTS_REL_AND_ABS):
23         ZDOTDIR="${PWD}/tests" cram --shell=zsh -v $@
24 .PHONY: $(_TESTS_REL_AND_ABS)
25
26 .PHONY: itest test