--- a/tests/hghave Sun Sep 13 17:08:31 2009 +0200
+++ b/tests/hghave Sun Sep 13 18:00:37 2009 +0200
@@ -123,6 +123,10 @@
def has_git():
return matchoutput('git --version 2>&1', r'^git version')
+def has_rst2html():
+ return matchoutput('rst2html --version', r'^rst2html \(Docutils') or \
+ matchoutput('rst2html.py --version', r'^rst2html.py \(Docutils')
+
def has_svn():
return matchoutput('svn --version 2>&1', r'^svn, version') and \
matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
@@ -195,6 +199,7 @@
"outer-repo": (has_outer_repo, "outer repo"),
"p4": (has_p4, "Perforce server and client"),
"pygments": (has_pygments, "Pygments source highlighting library"),
+ "rst2html": (has_rst2html, "Docutils rst2html tool"),
"svn": (has_svn, "subversion client and admin tools"),
"svn-bindings": (has_svn_bindings, "subversion python bindings"),
"symlink": (has_symlink, "symbolic links"),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-gendoc Sun Sep 13 18:00:37 2009 +0200
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" rst2html || exit 80
+RST2HTML=$(which rst2html 2> /dev/null || which rst2html.py)
+
+echo "checking for syntax errors in gendoc.py"
+python $TESTDIR/../doc/gendoc.py > gendoc.txt || exit
+
+# We run rst2html over the file without adding "--halt warning" to
+# make it report all errors instead of stopping on the first one.
+echo "checking for parse errors with rst2html"
+$RST2HTML gendoc.txt /dev/null
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-gendoc.out Sun Sep 13 18:00:37 2009 +0200
@@ -0,0 +1,2 @@
+checking for syntax errors in gendoc.py
+checking for parse errors with rst2html