Patchwork [8,of,8,v2] tests: splitting test-gendoc.t into per file tests [RFC]

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 7:09 a.m.
Message ID <660830fa0789ad40019f.1452582589@waste.org>
Download mbox | patch
Permalink /patch/12687/
State Superseded
Commit 7a1ad08b9ff5a50599e701cef11c431722eefa1c
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 7:09 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452113150 0
#      Wed Jan 06 20:45:50 2016 +0000
# Node ID 660830fa0789ad40019f8d968132094db5c94832
# Parent  457ce2835c3e3ac6a6be76bac77e125d8c2cb658
tests: splitting test-gendoc.t into per file tests [RFC]

This makes test-gendoc-C.t a template, whenever it changes,
test-gendoc.t will fail complaining about how the other
tests need to be updated.

It should ignore ignored failures in the individual
test-gendoc-LOCALE.t files.

Whenever a locale is added to i18n/*.po, test-gendoc.t
will automatically set it up by cloning test-gendoc-C.t,
and fail complaining that there's a file that needs to
be added to the repo.

--
Below is a timing comparison, the real time is about
1/7th the time of a single run, but it's technically
using 30s more cpu time (~60% increase for a single
cpu system). The third run is with -j1, so serialized
split tests, and it shows a 2s penalty (~1% increase).
Also, the timings are admittedly fairly noisy.

This to me argues that it's worth splitting this way.

(py)[timeless@gcc2-power8 tests]$ time ./run-tests.py -l -j60 test-gendoc*.t -i --time
..............
 # Ran 14 tests, 0 skipped, 0 warned, 0 failed.
 # Producing time report
start   end     cuser   csys    real      Test
  0.000   4.100   5.500   0.880   4.100   test-gendoc.t
  0.000   5.320  10.540   0.950   5.320   test-gendoc-da.t
  0.010   5.330  15.550   1.030   5.320   test-gendoc-sv.t
  0.010   5.440  20.700   1.100   5.430   test-gendoc-it.t
  0.010   6.080  26.480   1.160   6.070   test-gendoc-C.t
  0.010   6.120  32.310   1.230   6.110   test-gendoc-ja.t
  0.000   6.190  38.220   1.290   6.190   test-gendoc-de.t
  0.010   6.200  44.100   1.360   6.190   test-gendoc-ro.t
  0.000   6.420  50.260   1.420   6.420   test-gendoc-zh_CN.t
  0.000   6.430  56.400   1.510   6.430   test-gendoc-zh_TW.t
  0.000   6.490  62.600   1.570   6.490   test-gendoc-fr.t
  0.010   6.510  68.810   1.640   6.500   test-gendoc-ru.t
  0.000   6.520  75.070   1.710   6.520   test-gendoc-pt_BR.t
  0.000   6.540  81.350   1.780   6.540   test-gendoc-el.t

real   0m6.723s
user   1m21.489s
sys    0m1.886s
(py)[timeless@gcc2-power8 tests]$ time ./run-tests.py -l -j60 test-gendoc*.t
..............
 # Ran 14 tests, 0 skipped, 0 warned, 0 failed.

real   0m7.428s
user   1m29.672s
sys    0m1.964s
(py)[timeless@gcc2-power8 tests]$ hg co .^
1 files updated, 0 files merged, 13 files removed, 0 files unresolved
(py)[timeless@gcc2-power8 tests]$ time ./run-tests.py -l -j60 test-gendoc*.t -i --time
.
 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
 # Producing time report
start   end     cuser   csys    real      Test
  0.000  53.140  52.430   0.680  53.140   test-gendoc.t

real   0m53.350s
user   0m52.517s
sys    0m0.718s
(py)[timeless@gcc2-power8 tests]$ time ./run-tests.py -l -j1 test-gendoc*.t
..............
 # Ran 14 tests, 0 skipped, 0 warned, 0 failed.

real   0m55.373s
user   0m53.681s
sys    0m1.284s
Matt Mackall - Jan. 16, 2016, 7:17 p.m.
On Tue, 2016-01-12 at 01:09 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1452113150 0
> #      Wed Jan 06 20:45:50 2016 +0000
> # Node ID 660830fa0789ad40019f8d968132094db5c94832
> # Parent  457ce2835c3e3ac6a6be76bac77e125d8c2cb658
> tests: splitting test-gendoc.t into per file tests [RFC]
> 
> This makes test-gendoc-C.t a template, whenever it changes,
> test-gendoc.t will fail complaining about how the other
> tests need to be updated.

I like the general idea of this, but I think it should be structured thusly:

- move all the details of testing gendoc into a helper script
- make each language-specific test a trivial one command call and its output:

  $ TESTDIR/check-gendoc da
  checking for parse errors

  (without using hg cp)
- reduce the test-gendoc.t loop to checking there's a test for each language

This way, if we ever make changes to check-gendoc, we don't have to
remember to manually copy it to all the tests.

One benefit here worth mentioning is translators only need to run the test for
their language.

-- 
Mathematics is the supreme nostalgia of our time.

Patch

diff --git a/tests/test-gendoc.t b/tests/test-gendoc-C.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-C.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-C.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=C
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-da.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-da.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-da.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=da
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-de.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-de.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-de.t
@@ -5,62 +5,22 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
+  $ PO=de
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
   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)
   warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  Diese Erweiterung ist veraltet. Benutzen Sie stattdessen:hg:`log -r "children(REV)"`.
+  warning: please have a space before :hg:
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-el.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-el.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-el.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=el
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-fr.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-fr.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-fr.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=fr
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-it.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-it.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-it.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=it
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-ja.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-ja.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-ja.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=ja
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-pt_BR.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-pt_BR.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-pt_BR.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=pt_BR
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-ro.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-ro.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-ro.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=ro
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-ru.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-ru.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-ru.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=ru
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-sv.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-sv.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-sv.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=sv
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-zh_CN.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-zh_CN.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-zh_CN.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=zh_CN
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc-zh_TW.t
copy from tests/test-gendoc.t
copy to tests/test-gendoc-zh_TW.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc-zh_TW.t
@@ -5,62 +5,18 @@ 
 
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
-  >     LOCALE=`basename "$PO" .po`
-  >     echo
-  >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
-  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
-  > 
-  >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
-  >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > 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
-  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)
-  warning: please have a space before :hg:
-  
-  % 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
-  
-  % extracting documentation from ru
-  checking for parse errors
-  
-  % 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
+  $ PO=zh_TW
+  $ LOCALE=`basename "$PO" .po`
+
+extracting documentation
+
+  $ echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
+  $ echo "" >> gendoc-$LOCALE.txt
+  $ LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+
+checking for parse errors
+
+  $ python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
+  $ # We call runrst without adding "--halt warning" to make it report
+  $ # all errors instead of stopping on the first one.
+  $ python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
diff --git a/tests/test-gendoc.t b/tests/test-gendoc.t
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc.t
@@ -7,60 +7,33 @@ 
   $ export HGENCODING
   $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
   >     LOCALE=`basename "$PO" .po`
-  >     echo
   >     echo "% extracting documentation from $LOCALE"
-  >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
-  >     echo "" >> gendoc-$LOCALE.txt
   >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
   > 
   >     if [ $LOCALE != C ]; then
-  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
+  >         if [ -f $TESTDIR/test-gendoc-$LOCALE.t ]; then
+  >             sed -e "s/PO=C/PO=$LOCALE/" $TESTDIR/test-gendoc-C.t > test-gendoc-C.t
+  >             egrep -v "^  [^>$]" $TESTDIR/test-gendoc-$LOCALE.t > test-gendoc-$LOCALE.t
+  >             cmp test-gendoc-C.t test-gendoc-$LOCALE.t || diff -U8 test-gendoc-C.t test-gendoc-$LOCALE.t
+  >         else
+  >             (cd $TESTDIR;
+  >             hg cp test-gendoc-C.t test-gendoc-$LOCALE.t;
+  >             sed -e "s/PO=C/PO=$LOCALE/" test-gendoc-C.t > test-gendoc-$LOCALE.t
+  >             )
+  >         fi
+  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo "** NOTHING TRANSLATED ($LOCALE) **"
   >     fi
-  > 
-  >     echo "checking for parse errors"
-  >     python "$TESTDIR/../doc/docchecker" gendoc-$LOCALE.txt
-  >     # We call runrst without adding "--halt warning" to make it report
-  >     # all errors instead of stopping on the first one.
-  >     python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
-  > done
-  
+  > done; true
   % extracting documentation from C
-  checking for parse errors
-  
   % extracting documentation from da
-  checking for parse errors
-  
   % extracting documentation from de
-  checking for parse errors
-  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)
-  warning: please have a space before :hg:
-  
   % 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
-  
   % extracting documentation from ru
-  checking for parse errors
-  
   % 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