comparison tests/test-gendoc.t @ 28809:7a1ad08b9ff5

tests: splitting test-gendoc.t into per file tests Localizers can now run test-gendoc-$LOCALE.t instead of test-gendoc.t. After this change, test-gendoc.t only checks whether there is *some* localization for the expected set of languages and no others. Whenever a locale i18n/$LOCALE.po is added, someone needs to add test-gendoc-$LOCALE.t
author timeless <timeless@mozdev.org>
date Wed, 06 Jan 2016 20:45:50 +0000
parents 3d1baa702d1a
children 75be14993fda
comparison
equal deleted inserted replaced
28808:10c2ce44c35d 28809:7a1ad08b9ff5
5 5
6 $ HGENCODING=UTF-8 6 $ HGENCODING=UTF-8
7 $ export HGENCODING 7 $ export HGENCODING
8 $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do 8 $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
9 > LOCALE=`basename "$PO" .po` 9 > LOCALE=`basename "$PO" .po`
10 > echo
11 > echo "% extracting documentation from $LOCALE" 10 > echo "% extracting documentation from $LOCALE"
12 > echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
13 > echo "" >> gendoc-$LOCALE.txt
14 > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit 11 > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
15 > 12 >
16 > if [ $LOCALE != C ]; then 13 > if [ $LOCALE != C ]; then
17 > cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **' 14 > if [ ! -f $TESTDIR/test-gendoc-$LOCALE.t ]; then
15 > echo missing test-gendoc-$LOCALE.t
16 > fi
17 > cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo "** NOTHING TRANSLATED ($LOCALE) **"
18 > fi 18 > fi
19 > 19 > done; true
20 > echo "checking for parse errors"
21 > python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
22 > # We call runrst without adding "--halt warning" to make it report
23 > # all errors instead of stopping on the first one.
24 > python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
25 > done
26
27 % extracting documentation from C 20 % extracting documentation from C
28 checking for parse errors
29
30 % extracting documentation from da 21 % extracting documentation from da
31 checking for parse errors
32
33 % extracting documentation from de 22 % extracting documentation from de
34 checking for parse errors
35 Die Dateien werden dem Projektarchiv beim n\xc3\xa4chsten \xc3\x9cbernehmen (commit) hinzugef\xc3\xbcgt. Um dies vorher r\xc3\xbcckg\xc3\xa4ngig zu machen, siehe:hg:`forget`. (esc)
36 warning: please have a space before :hg:
37
38 % extracting documentation from el 23 % extracting documentation from el
39 checking for parse errors
40
41 % extracting documentation from fr 24 % extracting documentation from fr
42 checking for parse errors
43
44 % extracting documentation from it 25 % extracting documentation from it
45 checking for parse errors
46
47 % extracting documentation from ja 26 % extracting documentation from ja
48 checking for parse errors
49
50 % extracting documentation from pt_BR 27 % extracting documentation from pt_BR
51 checking for parse errors
52
53 % extracting documentation from ro 28 % extracting documentation from ro
54 checking for parse errors
55
56 % extracting documentation from ru 29 % extracting documentation from ru
57 checking for parse errors
58
59 % extracting documentation from sv 30 % extracting documentation from sv
60 checking for parse errors
61
62 % extracting documentation from zh_CN 31 % extracting documentation from zh_CN
63 checking for parse errors
64
65 % extracting documentation from zh_TW 32 % extracting documentation from zh_TW
66 checking for parse errors