diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2015-08-05 16:19:23 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2015-08-05 16:19:23 -0400 |
commit | ff85fc8d0b3ae88221e20ee9b070c23248eb7921 (patch) | |
tree | d26b16d93ec19052f66dc2092550fb23c040afe4 | |
parent | 2834855cb9fde734ce12f59694522c10bf0c0205 (diff) | |
download | postgresql-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.pm | 5 |
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 |