Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc1c1886

Browse files
committed
Unset language-related locale settings in any case, otherwise psql will
speak in tongues and mess up the regression test diffs.
1 parenteee82d4 commitc1c1886

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

‎doc/src/sgml/regress.sgml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.61 2009/02/11 14:03:41 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.62 2009/02/12 13:26:03 petere Exp $ -->
22

33
<chapter id="regress">
44
<title id="regress-title">Regression Tests</title>
@@ -218,11 +218,15 @@ gmake installcheck
218218
locale-related environment variables on
219219
the <command>make</command> command line, for example:
220220
<programlisting>
221-
gmake checkLC_ALL=de_DE.utf8
221+
gmake checkLANG=de_DE.utf8
222222
</programlisting>
223-
or analogously to use no locale:
223+
(The regression test driver unsets <envar>LC_ALL</envar>, so it
224+
does not work to choose the locale using that variable.) To use
225+
no locale, either unset all locale-related environment variables
226+
(or set them to <literal>C</literal>) or use the following
227+
special invocation:
224228
<programlisting>
225-
gmake checkLC_ALL=C
229+
gmake checkNO_LOCALE=1
226230
</programlisting>
227231
When running the tests against an existing installation, the
228232
locale setup is determined by the existing installation. To

‎src/test/regress/pg_regress.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.60 2009/02/11 14:03:42 petere Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.61 2009/02/12 13:26:03 petere Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -694,18 +694,25 @@ initialize_environment(void)
694694
unsetenv("LC_COLLATE");
695695
unsetenv("LC_CTYPE");
696696
unsetenv("LC_MONETARY");
697-
unsetenv("LC_MESSAGES");
698697
unsetenv("LC_NUMERIC");
699698
unsetenv("LC_TIME");
700-
unsetenv("LC_ALL");
701699
unsetenv("LANG");
702-
unsetenv("LANGUAGE");
703700
/* On Windows the default locale cannot be English, so force it */
704701
#if defined(WIN32)|| defined(__CYGWIN__)
705702
putenv("LANG=en");
706703
#endif
707704
}
708705

706+
/*
707+
* Set translation-related settings to English; otherwise psql
708+
* will produce translated messages and produce diffs. (XXX If we
709+
* ever support translation of pg_regress, this needs to be moved
710+
* elsewhere, where psql is actually called.)
711+
*/
712+
unsetenv("LANGUAGE");
713+
unsetenv("LC_ALL");
714+
putenv("LC_MESSAGES=C");
715+
709716
/*
710717
* Set multibyte as requested
711718
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp