##// END OF EJS Templates
commands: hg debuginstall checks missing templates (issue4151)...
commands: hg debuginstall checks missing templates (issue4151) Missing templates where not reported as a problem, only an empty bracket were shown as indication of no found template directory: $ hg debuginstall *...some lines* checking templates ()... *...some lines* no problems detected Now the problem is reported and extended with some information. The style of the messages is adapted to the other messages of debuginstall. When no templates directories exist, it writes: $ hg debuginstall *...some lines* checking templates ()... no template directories found (templates seem to have been installed incorrectly) *...some lines* 1 problems detected, please check your install! When the template map is not found, it writes: $ hg debuginstall *...some lines* checking templates (/path/to/mercurial/templates)... template 'default' not found (templates seem to have been installed incorrectly) *...some lines* 1 problems detected, please check your install! When the template map is buggy the message is the same as before. The error message is shown before the line "(templates seem ...)". No test is added because testing this failure is complicated. It would require to modify the templates directory of the mercurial installation, or to monkey patch a function (os.listdir or any from mercurial.templater) by a test extension.

File last commit:

r19923:52bc80d0 default
r20389:9a86b5b8 default
Show More
test-gendoc.t
61 lines | 1.7 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: unify test-gendoc
r12427 Test document extraction
$ "$TESTDIR/hghave" docutils || exit 80
$ HGENCODING=UTF-8
$ export HGENCODING
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ { echo C; find "$TESTDIR/../i18n" -name "*.po" | sort; } | while read PO; do
> LOCALE=`basename "$PO" .po`
Matt Mackall
tests: unify test-gendoc
r12427 > echo
> echo "% extracting documentation from $LOCALE"
> echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
> echo "" >> gendoc-$LOCALE.txt
Simon Heimberg
tests: really test translations for rst syntax errors (issue4003)...
r19922 > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
Matt Mackall
tests: unify test-gendoc
r12427 >
Simon Heimberg
tests: test-gendoc.t checks if anything was translated...
r19923 > if [ $LOCALE != C ]; then
> cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
> fi
>
Matt Mackall
tests: unify test-gendoc
r12427 > # We call runrst without adding "--halt warning" to make it report
> # all errors instead of stopping on the first one.
> echo "checking for parse errors"
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 > python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
Matt Mackall
tests: unify test-gendoc
r12427 > done
% extracting documentation from C
checking for parse errors
% extracting documentation from da
checking for parse errors
% extracting documentation from de
checking for parse errors
% extracting documentation from el
checking for parse errors
% extracting documentation from fr
checking for parse errors
% extracting documentation from it
checking for parse errors
% extracting documentation from ja
checking for parse errors
% extracting documentation from pt_BR
checking for parse errors
% extracting documentation from ro
checking for parse errors
Martin Geisler
test-gendoc: update for new Russian translation
r14475 % extracting documentation from ru
checking for parse errors
Matt Mackall
tests: unify test-gendoc
r12427 % extracting documentation from sv
checking for parse errors
% extracting documentation from zh_CN
checking for parse errors
% extracting documentation from zh_TW
checking for parse errors