summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMichael Paquier2025-03-17 03:42:23 +0000
committerMichael Paquier2025-03-17 03:42:23 +0000
commit19c6e92b13b2336d1db1b236457ab15d0894b506 (patch)
tree672b72d1e75f47fbbe28db3326267804c6af6dcf /contrib
parent5721e5453ebc59360b6756fe72d7499c4a02177c (diff)
Apply more consistent style for command options in TAP tests
This commit reshapes the grammar of some commands to apply a more consistent style across the board, following rules similar to ce1b0f9da03e: - Elimination of some pointless used-once variables. - Use of long options, to self-document better the options used. - Use of fat commas to link option names and their assigned values, including redirections, so as perltidy can be tricked to put them together. Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]> Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib')
-rw-r--r--contrib/auto_explain/t/001_auto_explain.pl2
-rw-r--r--contrib/basebackup_to_shell/t/001_basic.pl6
-rw-r--r--contrib/sepgsql/t/001_sepgsql.pl3
3 files changed, 6 insertions, 5 deletions
diff --git a/contrib/auto_explain/t/001_auto_explain.pl b/contrib/auto_explain/t/001_auto_explain.pl
index 6e514db35d1..80c0c19af58 100644
--- a/contrib/auto_explain/t/001_auto_explain.pl
+++ b/contrib/auto_explain/t/001_auto_explain.pl
@@ -28,7 +28,7 @@ sub query_log
}
my $node = PostgreSQL::Test::Cluster->new('main');
-$node->init('auth_extra' => [ '--create-role', 'regress_user1' ]);
+$node->init('auth_extra' => [ '--create-role' => 'regress_user1' ]);
$node->append_conf('postgresql.conf',
"session_preload_libraries = 'auto_explain'");
$node->append_conf('postgresql.conf', "auto_explain.log_min_duration = 0");
diff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl
index 6ffc89433a9..3ee4603bd3a 100644
--- a/contrib/basebackup_to_shell/t/001_basic.pl
+++ b/contrib/basebackup_to_shell/t/001_basic.pl
@@ -131,8 +131,10 @@ sub verify_backup
# Untar.
my $extract_path = PostgreSQL::Test::Utils::tempdir;
- system_or_bail($tar, 'xf', $backup_dir . '/' . $prefix . 'base.tar',
- '-C', $extract_path);
+ system_or_bail(
+ $tar,
+ 'xf' => $backup_dir . '/' . $prefix . 'base.tar',
+ '-C' => $extract_path);
# Verify.
$node->command_ok(
diff --git a/contrib/sepgsql/t/001_sepgsql.pl b/contrib/sepgsql/t/001_sepgsql.pl
index c5fd7254841..cd00e4963db 100644
--- a/contrib/sepgsql/t/001_sepgsql.pl
+++ b/contrib/sepgsql/t/001_sepgsql.pl
@@ -216,8 +216,7 @@ $node->append_conf('postgresql.conf', 'log_statement=none');
'-D' => $node->data_dir,
'template0'
],
- '<',
- $ENV{share_contrib_dir} . '/sepgsql.sql');
+ '<' => $ENV{share_contrib_dir} . '/sepgsql.sql');
ok($result, 'sepgsql installation script');
}