Patchwork [2,of,3] tests: really test translations for rst syntax errors (issue4003)

login
register
mail settings
Submitter Simon Heimberg
Date Oct. 18, 2013, 5:15 p.m.
Message ID <7b40ee1c254521033cf7.1382116546@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/2788/
State Accepted
Commit f27deed5c23f936acafc01ef4be8e183c14a8750
Headers show

Comments

Simon Heimberg - Oct. 18, 2013, 5:15 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1382114985 -7200
# Node ID 7b40ee1c254521033cf7e68b5eccde6046848323
# Parent  30e8e1fe5b6086d589641bfe7ec05cf9e1f17c58
tests: really test translations for rst syntax errors (issue4003)

The variable LC_ALL did not work, use LANGUAGE instead. Before this patch, the
original language C was generated (and tested) in every run.
Martin Geisler - Oct. 21, 2013, 7:45 a.m.
Simon Heimberg <simohe@besonet.ch> writes:

> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1382114985 -7200
> # Node ID 7b40ee1c254521033cf7e68b5eccde6046848323
> # Parent  30e8e1fe5b6086d589641bfe7ec05cf9e1f17c58
> tests: really test translations for rst syntax errors (issue4003)
>
> The variable LC_ALL did not work, use LANGUAGE instead. Before this
> patch, the original language C was generated (and tested) in every
> run.

Wow, I can't believe we had the test wrong for all this time... thanks
for catching this!

> diff -r 30e8e1fe5b60 -r 7b40ee1c2545 tests/test-gendoc.t
> --- a/tests/test-gendoc.t	Fre Okt 18 18:49:32 2013 +0200
> +++ b/tests/test-gendoc.t	Fre Okt 18 18:49:45 2013 +0200
> @@ -9,7 +9,7 @@
>    >     echo "% extracting documentation from $LOCALE"
>    >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
>    >     echo "" >> gendoc-$LOCALE.txt
> - > LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >>
> gendoc-$LOCALE.txt 2> /dev/null || exit
> + > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >>
> gendoc-$LOCALE.txt 2> /dev/null || exit
>    > 
>    >     # We call runrst without adding "--halt warning" to make it report
>    >     # all errors instead of stopping on the first one.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff -r 30e8e1fe5b60 -r 7b40ee1c2545 tests/test-gendoc.t
--- a/tests/test-gendoc.t	Fre Okt 18 18:49:32 2013 +0200
+++ b/tests/test-gendoc.t	Fre Okt 18 18:49:45 2013 +0200
@@ -9,7 +9,7 @@ 
   >     echo "% extracting documentation from $LOCALE"
   >     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
   >     echo "" >> gendoc-$LOCALE.txt
-  >     LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+  >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
   > 
   >     # We call runrst without adding "--halt warning" to make it report
   >     # all errors instead of stopping on the first one.