Files
postgresql/src/bin/scripts/t/030_createlang.pl
Alvaro Herrera c8642d909f PostgresNode: Add names to nodes
This makes the log files easier to follow when investigating a test
failure.

Author: Michael Paquier
Review: Noah Misch
2016-01-20 14:13:11 -03:00

26 lines
603 B
Perl

use strict;
use warnings;
use PostgresNode;
use TestLib;
use Test::More tests => 14;
program_help_ok('createlang');
program_version_ok('createlang');
program_options_handling_ok('createlang');
my $node = get_new_node('main');
$node->init;
$node->start;
$node->command_fails([ 'createlang', 'plpgsql' ],
'fails if language already exists');
$node->psql('postgres', 'DROP EXTENSION plpgsql');
$node->issues_sql_like(
[ 'createlang', 'plpgsql' ],
qr/statement: CREATE EXTENSION "plpgsql"/,
'SQL CREATE EXTENSION run');
$node->command_like([ 'createlang', '--list' ], qr/plpgsql/, 'list output');