Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc67a86f

Browse files
committed
Fix TAP tests to use only standard command-line argument ordering.
Some of the TAP tests were supposing that PG programs would accept switchesafter non-switch arguments on their command lines. While GNU getopt_long()does allow that, our own implementation does not, and it's nowheresuggested in our documentation that such cases should work. Adjust thetests to use only the documented syntax.Back-patch to 9.4, since without this the TAP tests fail when run withsrc/port's getopt_long() implementation.Michael Paquier
1 parent368b7c6 commitc67a86f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

‎src/bin/initdb/t/001_initdb.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
system_or_bail"rm -rf '$tempdir'/*";
2222

23-
command_ok(['initdb',"$tempdir/data",'-X',"$tempdir/pgxlog" ],
23+
command_ok(['initdb','-X',"$tempdir/pgxlog","$tempdir/data" ],
2424
'separate xlog directory');
2525

2626
system_or_bail"rm -rf '$tempdir'/*";
@@ -30,15 +30,15 @@
3030

3131
system_or_bail"rm -rf '$tempdir'/*";
3232
mkdir"$tempdir/pgxlog";
33-
command_ok(['initdb',"$tempdir/data",'-X',"$tempdir/pgxlog" ],
33+
command_ok(['initdb','-X',"$tempdir/pgxlog","$tempdir/data" ],
3434
'existing empty xlog directory');
3535

3636
system_or_bail"rm -rf '$tempdir'/*";
3737
mkdir"$tempdir/pgxlog";
3838
mkdir"$tempdir/pgxlog/lost+found";
39-
command_fails(['initdb',"$tempdir/data",'-X',"$tempdir/pgxlog" ],
39+
command_fails(['initdb','-X',"$tempdir/pgxlog","$tempdir/data" ],
4040
'existing nonempty xlog directory');
4141

4242
system_or_bail"rm -rf '$tempdir'/*";
43-
command_ok(['initdb',"$tempdir/data",'-T','german' ],
43+
command_ok(['initdb','-T','german',"$tempdir/data" ],
4444
'select default dictionary');

‎src/bin/scripts/t/010_clusterdb.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
psql'postgres',
2222
'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x';
2323
issues_sql_like(
24-
['clusterdb','postgres','-t','test1' ],
24+
['clusterdb','-t','test1','postgres' ],
2525
qr/statement: CLUSTER test1;/,
2626
'cluster specific table');

‎src/bin/scripts/t/020_createdb.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
qr/statement: CREATE DATABASE foobar1/,
1616
'SQL CREATE DATABASE run');
1717
issues_sql_like(
18-
['createdb','foobar2','-l','C','-E','LATIN1','-T','template0' ],
18+
['createdb','-l','C','-E','LATIN1','-T','template0','foobar2' ],
1919
qr/statement: CREATE DATABASE foobar2 ENCODING 'LATIN1'/,
2020
'create database with encoding');
2121

‎src/bin/scripts/t/090_reindexdb.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
psql'postgres',
2121
'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a);';
2222
issues_sql_like(
23-
['reindexdb','postgres','-t','test1' ],
23+
['reindexdb','-t','test1','postgres' ],
2424
qr/statement: REINDEX TABLE test1;/,
2525
'reindex specific table');
2626
issues_sql_like(
27-
['reindexdb','postgres','-i','test1x' ],
27+
['reindexdb','-i','test1x','postgres' ],
2828
qr/statement: REINDEX INDEX test1x;/,
2929
'reindex specific index');
3030
issues_sql_like(
31-
['reindexdb','postgres','-S','pg_catalog' ],
31+
['reindexdb','-S','pg_catalog','postgres' ],
3232
qr/statement: REINDEX SCHEMA pg_catalog;/,
3333
'reindex specific schema');
3434
issues_sql_like(
35-
['reindexdb','postgres','-s' ],
35+
['reindexdb','-s','postgres' ],
3636
qr/statement: REINDEX SYSTEM postgres;/,
3737
'reindex system tables');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp