annotate tests/test-gendoc.t @ 21575:8262c2a39ab8

revert: add some inline comments I spend some time understanding how this part of the revert code is working. I'm adding some comments to help the code readability. I expect most of them to disappear in a coming refactoring. But the refactoring should be easier to follow with the comment.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 13 May 2014 16:29:42 -0700
parents 3fedc29a98bb
children 7a9cbb315d84
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
1 Test document extraction
9446
57d682d7d2da test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
2
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
3 $ "$TESTDIR/hghave" docutils || exit 80
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
4 $ HGENCODING=UTF-8
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
5 $ export HGENCODING
20390
3fedc29a98bb tests: use ls instead of find, all files are in the same directory
Simon Heimberg <simohe@besonet.ch>
parents: 19923
diff changeset
6 $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14475
diff changeset
7 > LOCALE=`basename "$PO" .po`
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
8 > echo
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
9 > echo "% extracting documentation from $LOCALE"
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
10 > echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
11 > echo "" >> gendoc-$LOCALE.txt
19922
f27deed5c23f tests: really test translations for rst syntax errors (issue4003)
Simon Heimberg <simohe@besonet.ch>
parents: 16350
diff changeset
12 > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
13 >
19923
52bc80d0769f tests: test-gendoc.t checks if anything was translated
Simon Heimberg <simohe@besonet.ch>
parents: 19922
diff changeset
14 > if [ $LOCALE != C ]; then
52bc80d0769f tests: test-gendoc.t checks if anything was translated
Simon Heimberg <simohe@besonet.ch>
parents: 19922
diff changeset
15 > cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
52bc80d0769f tests: test-gendoc.t checks if anything was translated
Simon Heimberg <simohe@besonet.ch>
parents: 19922
diff changeset
16 > fi
52bc80d0769f tests: test-gendoc.t checks if anything was translated
Simon Heimberg <simohe@besonet.ch>
parents: 19922
diff changeset
17 >
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
18 > # We call runrst without adding "--halt warning" to make it report
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
19 > # all errors instead of stopping on the first one.
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
20 > echo "checking for parse errors"
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14475
diff changeset
21 > python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
22 > done
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
23
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
24 % extracting documentation from C
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
25 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
26
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
27 % extracting documentation from da
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
28 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
29
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
30 % extracting documentation from de
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
31 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
32
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
33 % extracting documentation from el
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
34 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
35
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
36 % extracting documentation from fr
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
37 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
38
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
39 % extracting documentation from it
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
40 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
41
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
42 % extracting documentation from ja
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
43 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
44
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
45 % extracting documentation from pt_BR
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
46 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
47
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
48 % extracting documentation from ro
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
49 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
50
14475
ac9a89dbdc00 test-gendoc: update for new Russian translation
Martin Geisler <mg@lazybytes.net>
parents: 12427
diff changeset
51 % extracting documentation from ru
ac9a89dbdc00 test-gendoc: update for new Russian translation
Martin Geisler <mg@lazybytes.net>
parents: 12427
diff changeset
52 checking for parse errors
ac9a89dbdc00 test-gendoc: update for new Russian translation
Martin Geisler <mg@lazybytes.net>
parents: 12427
diff changeset
53
12427
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
54 % extracting documentation from sv
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
55 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
56
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
57 % extracting documentation from zh_CN
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
58 checking for parse errors
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
59
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
60 % extracting documentation from zh_TW
f933b99eeb14 tests: unify test-gendoc
Matt Mackall <mpm@selenic.com>
parents: 12397
diff changeset
61 checking for parse errors