diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-07 22:35:19 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-07 22:35:19 -0700 |
commit | bc5b7c288d29215c585db254a203889e0dea54e2 (patch) | |
tree | 92949654697de1b42a749e442ab4faae5544c311 /oldtests/Makefile | |
parent | a411013e62cfc1e94fddbd6c217c5e6ad365b34f (diff) |
Removed oldtests.
Diffstat (limited to 'oldtests/Makefile')
-rw-r--r-- | oldtests/Makefile | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/oldtests/Makefile b/oldtests/Makefile deleted file mode 100644 index c8a30bd..0000000 --- a/oldtests/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -SHELL=/bin/bash -TESTDIR ?= * -PATT ?= . -TESTS=$(shell ls $(TESTDIR)/*.markdown | grep $(PATT)) -DIFFS=$(patsubst %.markdown,%.diff,$(TESTS)) -PROG ?= ../stmd -FILTER ?= perl -pe 's/ /␣/g' -TIDYCMD ?= tidy -asxhtml -utf8 --show-body-only yes --show-warnings no -quiet -DETAILS ?= 1 - -# Check to see if echo supports -e option to allow backslash escapes -ifeq ($(shell echo -e),-e) -ECHO=echo -else -ECHO=echo -e -endif - -all: $(DIFFS) - PASS=0;TESTS=0; \ - for f in $(DIFFS); do \ - let TESTS=TESTS+1; \ - [ -s $$f ] || let PASS=PASS+1; \ - done; \ - $(ECHO) "\033[1m$$PASS of $$TESTS tests passed.\033[0m"; \ - if [ $$TESTS -eq $$PASS ]; then exit 0; else exit 1; fi - -%.actual.html: %.markdown -ifeq ($(TIDY),1) - -cat $< | $(PROG) | $(TIDYCMD) > $@ -else - -cat $< | $(PROG) > $@ -endif - -%.expected.html: %.html -ifeq ($(TIDY),1) - -$(TIDYCMD) $< > $@ -else - cp $< $@ -endif - -%.diff: %.expected.html %.actual.html - diff --unified=1 <(cat $(word 1,$^) | $(FILTER)) <(cat $(word 2,$^) | $(FILTER)) > $@ ; \ - if [ -s $@ ]; then \ - $(ECHO) "\033[1;31m✘ $(patsubst %.diff,%,$@)\033[0m"; \ - if [ $(DETAILS) == "1" ]; then \ - $(ECHO) "\033[0;36m" ; cat $@; $(ECHO) "\033[0m"; \ - fi \ - else \ - $(ECHO) "\033[1;32m✓ $(patsubst %.diff,%,$@)\033[0m"; \ - fi - -.PHONY: all clean - -clean: - -@rm */*.{diff,actual.html,expected.html} |