aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/t/RewindTest.pm
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-07-08 20:25:52 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-07-08 20:25:52 -0400
commit91bdf499b37b0bbef34e2bab5cc40dde52bda52c (patch)
treeeaf3e17c4316cceece0724b5df1c69e98d8e2894 /src/bin/pg_rewind/t/RewindTest.pm
parent2b7dbc0db6ecf38fc305284d006a1ef8f5354fbb (diff)
downloadpostgresql-91bdf499b37b0bbef34e2bab5cc40dde52bda52c.tar.gz
postgresql-91bdf499b37b0bbef34e2bab5cc40dde52bda52c.zip
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
Diffstat (limited to 'src/bin/pg_rewind/t/RewindTest.pm')
-rw-r--r--src/bin/pg_rewind/t/RewindTest.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm
index 149b99159d0..7516af7a01a 100644
--- a/src/bin/pg_rewind/t/RewindTest.pm
+++ b/src/bin/pg_rewind/t/RewindTest.pm
@@ -112,7 +112,7 @@ sub check_query
}
else
{
- $stdout =~ s/\r//g if $Config{osname} eq 'msys';
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
is($stdout, $expected_stdout, "$test_name: query result matches");
}
return;