comparison tests/test-gendoc.t @ 16350:4f795f5fbb0b stable

tests: make tests work if directory contains special characters With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 03 Apr 2012 19:06:35 +0200
parents ac9a89dbdc00
children f27deed5c23f
comparison
equal deleted inserted replaced
16349:425f1fbcfb94 16350:4f795f5fbb0b
1 Test document extraction 1 Test document extraction
2 2
3 $ "$TESTDIR/hghave" docutils || exit 80 3 $ "$TESTDIR/hghave" docutils || exit 80
4 $ HGENCODING=UTF-8 4 $ HGENCODING=UTF-8
5 $ export HGENCODING 5 $ export HGENCODING
6 $ for PO in C $TESTDIR/../i18n/*.po; do 6 $ { echo C; find "$TESTDIR/../i18n" -name "*.po" | sort; } | while read PO; do
7 > LOCALE=`basename $PO .po` 7 > LOCALE=`basename "$PO" .po`
8 > echo 8 > echo
9 > echo "% extracting documentation from $LOCALE" 9 > echo "% extracting documentation from $LOCALE"
10 > echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt 10 > echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
11 > echo "" >> gendoc-$LOCALE.txt 11 > echo "" >> gendoc-$LOCALE.txt
12 > LC_ALL=$LOCALE python $TESTDIR/../doc/gendoc.py >> gendoc-$LOCALE.txt 2> /dev/null || exit 12 > LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
13 > 13 >
14 > # We call runrst without adding "--halt warning" to make it report 14 > # We call runrst without adding "--halt warning" to make it report
15 > # all errors instead of stopping on the first one. 15 > # all errors instead of stopping on the first one.
16 > echo "checking for parse errors" 16 > echo "checking for parse errors"
17 > python $TESTDIR/../doc/runrst html gendoc-$LOCALE.txt /dev/null 17 > python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
18 > done 18 > done
19 19
20 % extracting documentation from C 20 % extracting documentation from C
21 checking for parse errors 21 checking for parse errors
22 22