mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
They turned out to be too much of a portability headache, because they need a fairly new version of Test::More to work properly.
20 lines
444 B
Perl
20 lines
444 B
Perl
use strict;
|
|
use warnings;
|
|
use TestLib;
|
|
use Test::More tests => 11;
|
|
|
|
program_help_ok('dropuser');
|
|
program_version_ok('dropuser');
|
|
program_options_handling_ok('dropuser');
|
|
|
|
my $tempdir = tempdir;
|
|
start_test_server $tempdir;
|
|
|
|
psql 'postgres', 'CREATE ROLE foobar1';
|
|
issues_sql_like(
|
|
[ 'dropuser', 'foobar1' ],
|
|
qr/statement: DROP ROLE foobar1/,
|
|
'SQL DROP ROLE run');
|
|
|
|
command_fails([ 'dropuser', 'nonexistent' ], 'fails with nonexistent user');
|