summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorHeikki Linnakangas2024-06-27 18:06:27 +0000
committerHeikki Linnakangas2024-06-27 18:09:06 +0000
commit266454f192e8f67e8e5e8e9f7667d7c8c77de232 (patch)
tree479352c58dd306a1f7fb065e9a1bacbcafe6b766 /src/test
parent4b467a6581af0ff029133558ce1f1e55597b8be1 (diff)
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.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/perl/PostgreSQL/Test/BackgroundPsql.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
index 5c925c31902..9878bedef88 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} = '';