TESTSUMMARIZER=/users/glew/bin/text-test-summarizer
test:
	make test-topictree 2>&1 | $(TESTSUMMARIZER)


TWIKI=/nfs/pdx/disks/nhm.arch.futwiki.1/twiki

real:
	echo see ../find-unwritten-wiki-pages.Intel/Makefile -- make real

# Note: some of the lines use ./diff-file-output-by-test -tee, and some do not.
TDD=test-simple-twiki-data/data

TOPICTREESCRIPT=$(TWIKI)/tools/find-unwritten-wiki-pages/topictree-find-unmentioned-pages.pl

.PHONY: test-topictree
test-topictree:
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/WebSimplePages $(TDD)/WebSimplePages/TopicTreeWithExtraStuffNotToBeDeleted.txt | ./diff-file-output-by-test -tee testTopicTreeWithExtraStuffNotToBeDeleted.out
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/WebSimplePages $(TDD)/WebSimplePages/TopicTreePartial.txt | tee testTopicTreePartial.out
	-./diff-file-output-by-test testTopicTreePartial.out
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/WebSimplePages $(TDD)/WebSimplePages/TopicTree.txt | tee testTopicTree.out
	-./diff-file-output-by-test testTopicTree.out
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/WebSimplePages $(TDD)/WebSimplePages/TopicTreeEmpty.txt | tee testTopicTreeEmpty.out
	-./diff-file-output-by-test testTopicTreeEmpty.out
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/Web1 $(TDD)/Web1/TopicTree.txt | tee testWeb1TopicTree.out
	-./diff-file-output-by-test testWeb1TopicTree.out testWeb1TopicTree.out-expect
	@echo ======
	perl topictree-find-unmentioned-pages.pl $(TDD)/WebNoAuto $(TDD)/WebNoAuto/TopicTreeNoAuto.txt | tee testWebNoAutoTest.out
	-./diff-file-output-by-test testWebNoAutoTest.out testWebNoAutoTest.out-expect
	@echo ======
	rm -f testXWebTest.out testXWebTest.out
	perl $(TOPICTREESCRIPT) $(TDD)/XWebSource $(TDD)/XWebSource/SourcePage.txt | tee testXWebTest.out
	-./diff-file-output-by-test testXWebTest.out testXWebTest.out-expect
	@echo ======
	perl $(TOPICTREESCRIPT) -print_style replace-topictree $(TDD)/WebSimplePages $(TDD)/WebSimplePages/TopicTreeAutoPrintStyle.txt | tee testAutoPrintStyle.out
	-./diff-file-output-by-test testAutoPrintStyle.out testAutoPrintStyle.out-expect
	@echo ======


.PHONY: test-My_TWikilink_Regexp_Matcher
test-My_TWikilink_Regexp_Matcher:
	perl -e '$$::run_test=1;' -e 'do "My_TWikilink_Regexp_Matcher.pm";'


.PHONY: test-embed-tree
test-embed-tree:
	@echo ======
	perl embed-tree.pl test-simple-twiki-data/data/WebSimplePages
	@echo ======


.PHONY: test-findunwrittentwikipages-old
test-findunwrittentwikipages-old:
	perl findunwrittentwikipages-old.pl -directory XXX

.PHONY: test-my-twiki-renderer
test-my-twiki-renderer:
	perl test-my-twiki-renderer.pl

.PHONY: test-findunwrittentwikipages
test-findunwrittentwikipages:
#	perl findunwrittentwikipages.pl -file test-simple-twiki-data/data/WebSimplePages/WikiWord1.txt
	perl findunwrittentwikipages.pl -recurse -directory test-simple-twiki-data/data/Web1
#	perl findunwrittentwikipages.pl -file test-simple-twiki-data/data/Web1/TestLinks.txt

