diff options
Diffstat (limited to 'src/bin/scripts/t/020_createdb.pl')
-rw-r--r-- | src/bin/scripts/t/020_createdb.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl index d0830a4a1d3..694ec568047 100644 --- a/src/bin/scripts/t/020_createdb.pl +++ b/src/bin/scripts/t/020_createdb.pl @@ -86,6 +86,15 @@ if ($ENV{with_icu} eq 'yes') ], 'create database with icu locale from template database with icu provider' ); + + $node2->command_ok( + [ + 'createdb', '-T', 'template0', '--locale-provider', 'icu', + '--locale', 'en', '--lc-collate', 'C', '--lc-ctype', 'C', + 'foobar57' + ], + 'create database with locale as ICU locale' + ); } else { @@ -110,7 +119,7 @@ ALTER TABLE tab_foobar owner to role_foobar; CREATE POLICY pol_foobar ON tab_foobar FOR ALL TO role_foobar;'); $node->issues_sql_like( [ 'createdb', '-l', 'C', '-T', 'foobar2', 'foobar3' ], - qr/statement: CREATE DATABASE foobar3 TEMPLATE foobar2/, + qr/statement: CREATE DATABASE foobar3 TEMPLATE foobar2 LOCALE 'C'/, 'create database with template'); ($ret, $stdout, $stderr) = $node->psql( 'foobar3', @@ -137,7 +146,7 @@ $node->command_checks_all( 1, [qr/^$/], [ - qr/^createdb: error: database creation failed: ERROR: invalid locale name|^createdb: error: database creation failed: ERROR: new collation \(foo'; SELECT '1\) is incompatible with the collation of the template database/s + qr/^createdb: error: database creation failed: ERROR: invalid LC_COLLATE locale name|^createdb: error: database creation failed: ERROR: new collation \(foo'; SELECT '1\) is incompatible with the collation of the template database/s ], 'createdb with incorrect --lc-collate'); $node->command_checks_all( @@ -145,7 +154,7 @@ $node->command_checks_all( 1, [qr/^$/], [ - qr/^createdb: error: database creation failed: ERROR: invalid locale name|^createdb: error: database creation failed: ERROR: new LC_CTYPE \(foo'; SELECT '1\) is incompatible with the LC_CTYPE of the template database/s + qr/^createdb: error: database creation failed: ERROR: invalid LC_CTYPE locale name|^createdb: error: database creation failed: ERROR: new LC_CTYPE \(foo'; SELECT '1\) is incompatible with the LC_CTYPE of the template database/s ], 'createdb with incorrect --lc-ctype'); |