aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2015-08-05 16:19:23 -0400
committerAndrew Dunstan <andrew@dunslane.net>2015-08-05 16:19:23 -0400
commitff85fc8d0b3ae88221e20ee9b070c23248eb7921 (patch)
treed26b16d93ec19052f66dc2092550fb23c040afe4
parent2834855cb9fde734ce12f59694522c10bf0c0205 (diff)
downloadpostgresql-ff85fc8d0b3ae88221e20ee9b070c23248eb7921.tar.gz
postgresql-ff85fc8d0b3ae88221e20ee9b070c23248eb7921.zip
Remove carriage returns from certain tap test output under Msys
These were causing spurious test failures.
-rw-r--r--src/test/perl/TestLib.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index 8fd6f2c92a8..4927d45d59c 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -226,6 +226,7 @@ sub psql
print("# Running SQL command: $sql\n");
run [ 'psql', '-X', '-A', '-t', '-q', '-d', $dbname, '-f', '-' ], '<', \$sql, '>', \$stdout, '2>', \$stderr or die;
chomp $stdout;
+ $stdout =~ s/\r//g if $Config{osname} eq 'msys';
return $stdout;
}
@@ -242,7 +243,9 @@ sub slurp_file
{
local $/;
local @ARGV = @_;
- <>
+ my $contents = <>;
+ $contents =~ s/\r//g if $Config{osname} eq 'msys';
+ return $contents;
}
sub system_or_bail