postgres.git / summary / log / commit / refs
commit e00a9a4c7bcae0f1b798b567bb37841ae7c6ff7d
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Thu Jun 27 18:06:27 2024 +0000
First released in: 17.0, 12.20, 13.16, 14.13, 15.8, 16.4
tests: Trim newline from result returned by BackgroundPsql->query
This went unnoticed, because only a few existing callers of
BackgroundPsql->query used the result, and the ones that did were not
bothered by an extra newline. I noticed because I was about to add a
new test that checks the result.
Backport to all supported versions, since I just backported the
BackgroundPsql facility to all supported versions too.
src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
index 4091c311b8a..3c2aca1c5d7 100644
--- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
+++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
@@ -223,7 +223,7 @@ sub query
$output = $self->{stdout};
# remove banner again, our caller doesn't care
- $output =~ s/\n$banner$//s;
+ $output =~ s/\n$banner\n$//s;
# clear out output for the next query
$self->{stdout} = '';
[parent: 79228c045981]