aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/t/010_clusterdb.pl
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-01-22 14:47:13 +0900
committerMichael Paquier <michael@paquier.xyz>2025-01-22 14:47:13 +0900
commitce1b0f9da03e1cebc293f60b378079b22bd7cc0f (patch)
tree78c3030de2cc9d201168e8297b5754bf35e37fd2 /src/bin/scripts/t/010_clusterdb.pl
parent4a0e7314f11ee03adfe9df945598c068b4179314 (diff)
downloadpostgresql-ce1b0f9da03e1cebc293f60b378079b22bd7cc0f.tar.gz
postgresql-ce1b0f9da03e1cebc293f60b378079b22bd7cc0f.zip
Improve grammar of options for command arrays in TAP tests
This commit rewrites a good chunk of the command arrays in TAP tests with a grammar based on the following rules: - Fat commas are used between option names and their values, making it clear to both humans and perltidy that values and names are bound together. This is particularly useful for the readability of multi-line command arrays, and there are plenty of them in the TAP tests. Most of the test code is updated to use this style. Some commands used parenthesis to show the link, or attached values and options in a single string. These are updated to use fat commas instead. - Option names are switched to use their long names, making them more self-documented. Based on a suggestion by Andrew Dunstan. - Add some trailing commas after the last item in multi-line arrays, which is a common perl style. Not all the places are taken care of, but this covers a very good chunk of them. Author: Dagfinn Ilmari Mannsåker Reviewed-by: Michael Paquier, Peter Smith, Euler Taveira Discussion: https://postgr.es/m/87jzc46d8u.fsf@wibble.ilmari.org
Diffstat (limited to 'src/bin/scripts/t/010_clusterdb.pl')
-rw-r--r--src/bin/scripts/t/010_clusterdb.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl
index f42a26b22de..a4e4d468578 100644
--- a/src/bin/scripts/t/010_clusterdb.pl
+++ b/src/bin/scripts/t/010_clusterdb.pl
@@ -21,14 +21,14 @@ $node->issues_sql_like(
qr/statement: CLUSTER;/,
'SQL CLUSTER run');
-$node->command_fails([ 'clusterdb', '-t', 'nonexistent' ],
+$node->command_fails([ 'clusterdb', '--table' => 'nonexistent' ],
'fails with nonexistent table');
$node->safe_psql('postgres',
'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x'
);
$node->issues_sql_like(
- [ 'clusterdb', '-t', 'test1' ],
+ [ 'clusterdb', '--table' => 'test1' ],
qr/statement: CLUSTER public\.test1;/,
'cluster specific table');