4 use Test::More tests => 13;
6 program_help_ok('clusterdb');
7 program_version_ok('clusterdb');
8 program_options_handling_ok('clusterdb');
10 my $tempdir = tempdir;
11 start_test_server $tempdir;
14 [ 'clusterdb', 'postgres' ],
15 qr/statement: CLUSTER;/,
18 command_fails([ 'clusterdb', '-t', 'nonexistent', 'postgres' ],
19 'fails with nonexistent table');
22 'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x';
24 [ 'clusterdb', '-t', 'test1', 'postgres' ],
25 qr/statement: CLUSTER test1;/,
26 'cluster specific table');