author | Michael Krelin <hacker@klever.net> | 2011-08-26 21:22:00 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-08-26 21:22:00 (UTC) |
commit | 1d00b262ddf0d6c3207a4b796d48899ed79bffcd (patch) (unidiff) | |
tree | 03d745873ba13ffb0e2fe1831ecb41f7c0b05758 /test/Makefile.am | |
download | cliche-0.0.zip cliche-0.0.tar.gz cliche-0.0.tar.bz2 |
initial commit into the public repository0.0
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | test/Makefile.am | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..705278d --- a/dev/null +++ b/test/Makefile.am | |||
@@ -0,0 +1,32 @@ | |||
1 | TESTS=\ | ||
2 | r01_closing_at_the_line_start.clichec \ | ||
3 | r02_anchor_after_literal.clichec \ | ||
4 | r03_percent_after_empty.clichec \ | ||
5 | r04_too_seamless_transitions.clichec | ||
6 | |||
7 | EXTRA_DIST=$(TESTS) | ||
8 | CLEANFILES = $(basename $(TESTS)) \ | ||
9 | $(foreach s,.out .diff,$(addsuffix $s,$(basename $(TESTS)))) | ||
10 | .INTERMEDIATE: $(CLEANFILES) | ||
11 | |||
12 | TEST_EXTENSIONS=.clichec | ||
13 | CLICHEC_LOG_COMPILER=test_clichec() { \ | ||
14 | $(MAKE) "$$(basename $$1 .clichec)"{,.{out,diff,check}} ;\ | ||
15 | }; test_clichec | ||
16 | |||
17 | gitignore: .gitignore | ||
18 | .gitignore: Makefile | ||
19 | for t in ${TESTS} ; do for f in "$${t%.*}"{,.{out,diff,check,log}} ; do \ | ||
20 | grep -q "^/$$f" .gitignore || echo "/$$f" >>.gitignore ;\ | ||
21 | done done | ||
22 | |||
23 | CLICHE=${top_builddir}/src/cliche | ||
24 | SUFFIXES=.clichec .cc .out .diff .check | ||
25 | .clichec.cc: | ||
26 | $(CLICHE) -C -o $@ $< | ||
27 | %.out: % | ||
28 | ${builddir}/$< >$@ | ||
29 | %.diff: ${builddir}/%.out ${srcdir}/%.expected | ||
30 | @-diff -u "$*.expected" "$*.out" >"$@" | ||
31 | %.check: %.diff | ||
32 | @test -s "$<" && { cat "$*.out";cp "$*.out" "$*.unexpected" ; exit 1 ; } || true | ||