mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
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
c7db01e325
, 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.
This commit is contained in:
parent
c7db01e325
commit
1e08576691
@ -31,13 +31,16 @@ if ($ENV{with_icu} eq 'yes')
|
|||||||
# locale set. It would succeed if template0 used the icu
|
# locale set. It would succeed if template0 used the icu
|
||||||
# provider. XXX Maybe split into multiple tests?
|
# provider. XXX Maybe split into multiple tests?
|
||||||
$node->command_fails(
|
$node->command_fails(
|
||||||
[ 'createdb', '-T', 'template0', '--locale-provider=icu', 'foobar4' ],
|
[
|
||||||
|
'createdb', '-T', 'template0', '-E', 'UTF8',
|
||||||
|
'--locale-provider=icu', 'foobar4'
|
||||||
|
],
|
||||||
'create database with ICU fails without ICU locale specified');
|
'create database with ICU fails without ICU locale specified');
|
||||||
|
|
||||||
$node->issues_sql_like(
|
$node->issues_sql_like(
|
||||||
[
|
[
|
||||||
'createdb', '-T',
|
'createdb', '-T',
|
||||||
'template0', '--locale-provider=icu',
|
'template0', '-E', 'UTF8', '--locale-provider=icu',
|
||||||
'--icu-locale=en', 'foobar5'
|
'--icu-locale=en', 'foobar5'
|
||||||
],
|
],
|
||||||
qr/statement: CREATE DATABASE foobar5 .* LOCALE_PROVIDER icu ICU_LOCALE 'en'/,
|
qr/statement: CREATE DATABASE foobar5 .* LOCALE_PROVIDER icu ICU_LOCALE 'en'/,
|
||||||
@ -45,7 +48,8 @@ if ($ENV{with_icu} eq 'yes')
|
|||||||
|
|
||||||
$node->command_fails(
|
$node->command_fails(
|
||||||
[
|
[
|
||||||
'createdb', '-T', 'template0', '--locale-provider=icu',
|
'createdb', '-T', 'template0', '-E', 'UTF8',
|
||||||
|
'--locale-provider=icu',
|
||||||
'--icu-locale=@colNumeric=lower', 'foobarX'
|
'--icu-locale=@colNumeric=lower', 'foobarX'
|
||||||
],
|
],
|
||||||
'fails for invalid ICU locale');
|
'fails for invalid ICU locale');
|
||||||
|
Loading…
Reference in New Issue
Block a user