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

Commit 1e08576

Browse files
committed
Fix createdb tests for C locale
If the createdb tests run under the C locale, the database cluster will be initialized with encoding SQL_ASCII. With the checks added in c7db01e, this will cause several ICU-related tests to fail because SQL_ASCII is not supported by ICU. To work around that, use initdb option -E UTF8 for those tests to get past that check.
1 parent c7db01e commit 1e08576

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,25 @@
3131
# locale set. It would succeed if template0 used the icu
3232
# provider. XXX Maybe split into multiple tests?
3333
$node->command_fails(
34-
[ 'createdb', '-T', 'template0', '--locale-provider=icu', 'foobar4' ],
34+
[
35+
'createdb', '-T', 'template0', '-E', 'UTF8',
36+
'--locale-provider=icu', 'foobar4'
37+
],
3538
'create database with ICU fails without ICU locale specified');
3639

3740
$node->issues_sql_like(
3841
[
3942
'createdb', '-T',
40-
'template0', '--locale-provider=icu',
43+
'template0', '-E', 'UTF8', '--locale-provider=icu',
4144
'--icu-locale=en', 'foobar5'
4245
],
4346
qr/statement: CREATE DATABASE foobar5 .* LOCALE_PROVIDER icu ICU_LOCALE 'en'/,
4447
'create database with ICU locale specified');
4548

4649
$node->command_fails(
4750
[
48-
'createdb', '-T', 'template0', '--locale-provider=icu',
51+
'createdb', '-T', 'template0', '-E', 'UTF8',
52+
'--locale-provider=icu',
4953
'--icu-locale=@colNumeric=lower', 'foobarX'
5054
],
5155
'fails for invalid ICU locale');

0 commit comments

Comments
 (0)