summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-10-07 11:47:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-10-07 11:47:27 -0400
commitafd532c3a80c12a9c0f836c5e4fc3cfe6503b91f (patch)
treeda4855f9b2afc78ed5763d45a8182fa45d569eaa /src
parent27da1a796ff9a367c34d431fd28be923cd8da507 (diff)
Adjust new TAP test to work on macOS.
Seems Apple's version of "wc -l" puts spaces before the number. (I wonder why the cfbot didn't find this.) While here, make the failure case log what it got, to aid debugging future issues. Per buildfarm.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/t/030_pager.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/psql/t/030_pager.pl b/src/bin/psql/t/030_pager.pl
index dd2be340e55..afe97355c44 100644
--- a/src/bin/psql/t/030_pager.pl
+++ b/src/bin/psql/t/030_pager.pl
@@ -25,8 +25,10 @@ my $result = IPC::Run::run [ 'wc', '-l' ],
'>' => \$wcstdout,
'2>' => \$wcstderr;
chomp $wcstdout;
-if ($wcstdout ne '2' || $wcstderr ne '')
+if ($wcstdout !~ /^ *2$/ || $wcstderr ne '')
{
+ note "wc stdout = '$wcstdout'\n";
+ note "wc stderr = '$wcstderr'\n";
plan skip_all => '"wc -l" is needed to run this test';
}
@@ -83,17 +85,17 @@ do_command(
do_command(
"SELECT 'test' AS t FROM generate_series(1,24);\n",
- qr/^24\r?$/m,
+ qr/^ *24\r?$/m,
"execute SELECT query that needs pagination");
do_command(
"\\pset expanded\nSELECT generate_series(1,20) as g;\n",
- qr/^39\r?$/m,
+ qr/^ *39\r?$/m,
"execute SELECT query that needs pagination in expanded mode");
do_command(
"\\pset tuples_only off\n\\d+ information_schema.referential_constraints\n",
- qr/^\d+\r?$/m,
+ qr/^ *\d+\r?$/m,
"execute command with footer that needs pagination");
# send psql an explicit \q to shut it down, else pty won't close properly