pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tighten up Windows CRLF conversion in our TAP test scripts.
Date: Thu, 09 Jul 2020 00:25:58 +0000
Message-ID: <E1jtKNy-0008HV-Ps@gemulon.postgresql.org> (raw)

Tighten up Windows CRLF conversion in our TAP test scripts.

The previous approach was to search-and-destroy all \r occurrences
no matter what.  That seems more likely to hide bugs than anything
else; indeed it seems to be hiding one now.  Fix things so that
we only transform \r\n to \n.

Side effects: must do this before, not after, chomp'ing if we're
going to chomp, else we'd fail to clean up a trailing \r\n.  Also,
remove safe_psql's redundant repetition of what psql already did;
else it might reduce \r\r\n to \n, which is exactly the scenario
I'm hoping to expose.

Perhaps this should be back-patched, but for now I'm content to
see what happens in HEAD.

Discussion: https://postgr.es/m/412ae8da-76bb-640f-039a-f3513499e53d@gmx.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/91bdf499b37b0bbef34e2bab5cc40dde52bda52c

Modified Files
--------------
src/bin/pg_rewind/t/RewindTest.pm |  2 +-
src/test/perl/PostgresNode.pm     | 13 ++++++-------
src/test/perl/TestLib.pm          |  2 +-
3 files changed, 8 insertions(+), 9 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1jtKNy-0008HV-Ps@gemulon.postgresql.org>
Permalink:  ../E1jtKNy-0008HV-Ps@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jtKNy-0008HV-Ps@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Tighten up Windows CRLF conversion in our TAP test scripts.
  In-Reply-To: <E1jtKNy-0008HV-Ps@gemulon.postgresql.org>
  References: <E1jtKNy-0008HV-Ps@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox