aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/t/050_dropdb.pl
blob: 3662dd01c1d901f5d02a2f986b4fe2c479304c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use TestLib;
use Test::More tests => 5;

program_help_ok('dropdb');
program_version_ok('dropdb');
program_options_handling_ok('dropdb');

my $tempdir = tempdir;
start_test_server $tempdir;

psql 'postgres', 'CREATE DATABASE foobar1';
issues_sql_like(['dropdb', 'foobar1'], qr/statement: DROP DATABASE foobar1/, 'SQL DROP DATABASE run');

command_fails(['dropdb', 'nonexistent'], 'fails with nonexistent database');