aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile
index aec10c1..265c67c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -33,9 +33,9 @@ else
i = @echo ==
endif
-.PHONY: all clean app ct eunit
+.PHONY: all clean app ct eunit docs
-all: app ct eunit clean
+all: app ct eunit docs clean
$i '+---------------------+'
$i '| All tests passed. |'
$i '+---------------------+'
@@ -147,6 +147,29 @@ eunit: app1
$t rm -rf app1/eunit app1/src/t.erl app1/test-eunit.log
$i "Test 'eunit' passed."
+docs: app1
+ $i "docs: Testing EDoc including DOC_DEPS."
+ $t printf "%s\n" \
+ "PROJECT = app1" \
+ "DOC_DEPS = edown" \
+ "dep_edown = git https://github.com/uwiger/edown.git 0.5" \
+ "EDOC_OPTS = {doclet, edown_doclet}" \
+ "include erlang.mk" \
+ "distclean:: distclean-doc-md" \
+ "distclean-doc-md:" \
+ " rm -rf doc/*.md" \
+ > app1/Makefile-doc
+ $i "Downloading doc deps (edown) and building docs."
+ $t make -C app1 -f Makefile-doc docs $v
+ $i "Checking that 'make docs' using edown generated a markdown file."
+ $t [ -e app1/doc/m.md ]
+ $i "Checking that 'make distclean' deletes all generated doc files."
+ $t make -C app1 -f Makefile-doc distclean $v
+ $t [ "`ls app1/doc/`" == "" ]
+ $i "Cleaning up test data."
+ $t rm app1/Makefile-doc
+ $i "Test 'docs' passed."
+
# Test application used for testing.
app1:
$i "Setting up app."