mirror of
https://github.com/postgres/postgres.git
synced 2026-05-19 08:41:23 -04:00
This makes the log files easier to follow when investigating a test failure. Author: Michael Paquier Review: Noah Misch
26 lines
652 B
Perl
26 lines
652 B
Perl
use strict;
|
|
use warnings;
|
|
|
|
use PostgresNode;
|
|
use TestLib;
|
|
use Test::More tests => 13;
|
|
|
|
program_help_ok('createdb');
|
|
program_version_ok('createdb');
|
|
program_options_handling_ok('createdb');
|
|
|
|
my $node = get_new_node('main');
|
|
$node->init;
|
|
$node->start;
|
|
|
|
$node->issues_sql_like(
|
|
[ 'createdb', 'foobar1' ],
|
|
qr/statement: CREATE DATABASE foobar1/,
|
|
'SQL CREATE DATABASE run');
|
|
$node->issues_sql_like(
|
|
[ 'createdb', '-l', 'C', '-E', 'LATIN1', '-T', 'template0', 'foobar2' ],
|
|
qr/statement: CREATE DATABASE foobar2 ENCODING 'LATIN1'/,
|
|
'create database with encoding');
|
|
|
|
$node->command_fails([ 'createdb', 'foobar1' ],
|
|
'fails if database already exists');
|