Mercurial > hg
annotate tests/test-gendoc @ 9827:4fe9ca519637
mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127)
Previous code was computing hunks then checking if these hunks could be ignored
when taking whitespace/blank-lines options in accounts. This approach is simple
but fails with hunks containing both whitespace and non-whitespace changes, the
whole hunk is emitted while it can be mostly made of whitespace. The new
version normalize the whitespaces before hunk generation, and test for
blank-lines afterwards.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 11 Nov 2009 18:31:42 +0100 |
parents | 7d6ac5d7917c |
children | 08a0f04b56bd |
rev | line source |
---|---|
9446
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
1 #!/bin/sh |
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
2 |
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
3 "$TESTDIR/hghave" rst2html || exit 80 |
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
4 RST2HTML=$(which rst2html 2> /dev/null || which rst2html.py) |
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
5 |
9485
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
6 HGENCODING=UTF-8 |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
7 export HGENCODING |
9446
57d682d7d2da
test-gendoc: test documentation generation
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
8 |
9485
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
9 for PO in C $TESTDIR/../i18n/*.po; do |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
10 LOCALE=$(basename $PO .po) |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
11 echo |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
12 echo "% extracting documentation from $LOCALE" |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
13 echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
14 echo "" >> gendoc-$LOCALE.txt |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
15 LC_ALL=$LOCALE python $TESTDIR/../doc/gendoc.py >> gendoc-$LOCALE.txt || exit |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
16 |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
17 # We run rst2html over the file without adding "--halt warning" to |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
18 # make it report all errors instead of stopping on the first one. |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
19 echo "checking for parse errors with rst2html" |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
20 $RST2HTML gendoc-$LOCALE.txt /dev/null |
7d6ac5d7917c
test-gendoc: add tests for all languages
Martin Geisler <mg@lazybytes.net>
parents:
9446
diff
changeset
|
21 done |