diff options
Diffstat (limited to 'src/bin/scripts/t/030_createlang.pl')
-rw-r--r-- | src/bin/scripts/t/030_createlang.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/scripts/t/030_createlang.pl b/src/bin/scripts/t/030_createlang.pl new file mode 100644 index 00000000000..9a87f4c89c6 --- /dev/null +++ b/src/bin/scripts/t/030_createlang.pl @@ -0,0 +1,18 @@ +use strict; +use warnings; +use TestLib; +use Test::More tests => 6; + +program_help_ok('createlang'); +program_version_ok('createlang'); +program_options_handling_ok('createlang'); + +my $tempdir = tempdir; +start_test_server $tempdir; + +command_fails(['createlang', 'plpgsql', 'postgres'], 'fails if language already exists'); + +psql 'postgres', 'DROP EXTENSION plpgsql'; +issues_sql_like(['createlang', 'plpgsql', 'postgres'], qr/statement: CREATE EXTENSION "plpgsql"/, 'SQL CREATE EXTENSION run'); + +command_like(['createlang', '--list', 'postgres'], qr/plpgsql/, 'list output'); |