Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e2a2357

Browse files
committed
Fix test failures when language environment is not UTF-8.
For tests that depend on UTF-8 encoding, force LC_COLLATE=C and LC_CTYPE=C to avoid an encoding mismatch. Reported-by: Thomas Munro Discussion: https://postgr.es/m/CA+hUKGK-ZqV1njkG_=xcCqXh2fcMkz85FTMnhS2opm4ZerH=xw@mail.gmail.com
1 parent e57fe38 commit e2a2357

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/bin/initdb/t/001_initdb.pl

+2
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
[
201201
'initdb', '--no-sync',
202202
'--locale-provider=builtin', '-E UTF-8',
203+
'--lc-collate=C', '--lc-ctype=C',
203204
'--builtin-locale=C.UTF-8', "$tempdir/data8"
204205
],
205206
'locale provider builtin with -E UTF-8 --builtin-locale=C.UTF-8');
@@ -208,6 +209,7 @@
208209
[
209210
'initdb', '--no-sync',
210211
'--locale-provider=builtin', '-E SQL_ASCII',
212+
'--lc-collate=C', '--lc-ctype=C',
211213
'--builtin-locale=C.UTF-8', "$tempdir/data9"
212214
],
213215
'locale provider builtin with --builtin-locale=C.UTF-8 fails for SQL_ASCII'

src/bin/scripts/t/020_createdb.pl

+2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
[
144144
'createdb', '-T',
145145
'template0', '--locale-provider=builtin',
146+
'--lc-collate=C', '--lc-ctype=C',
146147
'-E UTF-8', '--builtin-locale=C.UTF8',
147148
'tbuiltin5'
148149
],
@@ -152,6 +153,7 @@
152153
[
153154
'createdb', '-T',
154155
'template0', '--locale-provider=builtin',
156+
'--lc-collate=C', '--lc-ctype=C',
155157
'-E LATIN1', '--builtin-locale=C.UTF-8',
156158
'tbuiltin6'
157159
],

0 commit comments

Comments
 (0)