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) (side-by-side diff) | |
tree | 03d745873ba13ffb0e2fe1831ecb41f7c0b05758 /test/Makefile.am | |
download | cliche-1d00b262ddf0d6c3207a4b796d48899ed79bffcd.zip cliche-1d00b262ddf0d6c3207a4b796d48899ed79bffcd.tar.gz cliche-1d00b262ddf0d6c3207a4b796d48899ed79bffcd.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 @@ +TESTS=\ + r01_closing_at_the_line_start.clichec \ + r02_anchor_after_literal.clichec \ + r03_percent_after_empty.clichec \ + r04_too_seamless_transitions.clichec + +EXTRA_DIST=$(TESTS) +CLEANFILES = $(basename $(TESTS)) \ + $(foreach s,.out .diff,$(addsuffix $s,$(basename $(TESTS)))) +.INTERMEDIATE: $(CLEANFILES) + +TEST_EXTENSIONS=.clichec +CLICHEC_LOG_COMPILER=test_clichec() { \ + $(MAKE) "$$(basename $$1 .clichec)"{,.{out,diff,check}} ;\ +}; test_clichec + +gitignore: .gitignore +.gitignore: Makefile + for t in ${TESTS} ; do for f in "$${t%.*}"{,.{out,diff,check,log}} ; do \ + grep -q "^/$$f" .gitignore || echo "/$$f" >>.gitignore ;\ + done done + +CLICHE=${top_builddir}/src/cliche +SUFFIXES=.clichec .cc .out .diff .check +.clichec.cc: + $(CLICHE) -C -o $@ $< +%.out: % + ${builddir}/$< >$@ +%.diff: ${builddir}/%.out ${srcdir}/%.expected + @-diff -u "$*.expected" "$*.out" >"$@" +%.check: %.diff + @test -s "$<" && { cat "$*.out";cp "$*.out" "$*.unexpected" ; exit 1 ; } || true |