blob: a8e8f3b4d12f806fd2cd3016c4be427205de99ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use strict;
use warnings;
use TestLib;
use Test::More tests => 6;
program_help_ok('createdb');
program_version_ok('createdb');
program_options_handling_ok('createdb');
my $tempdir = tempdir;
start_test_server $tempdir;
issues_sql_like(
[ 'createdb', 'foobar1' ],
qr/statement: CREATE DATABASE foobar1/,
'SQL CREATE DATABASE run');
issues_sql_like(
[ 'createdb', 'foobar2', '-l', 'C', '-E', 'LATIN1', '-T', 'template0' ],
qr/statement: CREATE DATABASE foobar2 ENCODING 'LATIN1'/,
'create database with encoding');
command_fails([ 'createdb', 'foobar1' ], 'fails if database already exists');
|