diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-06-27 21:06:27 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-06-27 21:08:49 +0300 |
commit | 071e19a36c68dd5f1d949ecf9f110f1ec95a9532 (patch) | |
tree | c5739b33d6ddf9b725ac88ffa22b87ae9cfdae0c | |
parent | 12f327b210b3b093e09778ec05fd44bbee4b0736 (diff) | |
download | postgresql-071e19a36c68dd5f1d949ecf9f110f1ec95a9532.tar.gz postgresql-071e19a36c68dd5f1d949ecf9f110f1ec95a9532.zip |
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.
-rw-r--r-- | src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 2 |
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} = ''; |