projects
/
postgresql
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2834855
)
Remove carriage returns from certain tap test output under Msys
author
Andrew Dunstan
<andrew@dunslane.net>
Wed, 5 Aug 2015 20:19:23 +0000
(16:19 -0400)
committer
Andrew Dunstan
<andrew@dunslane.net>
Wed, 5 Aug 2015 20:19:23 +0000
(16:19 -0400)
These were causing spurious test failures.
src/test/perl/TestLib.pm
patch
|
blob
|
history
diff --git
a/src/test/perl/TestLib.pm
b/src/test/perl/TestLib.pm
index 8fd6f2c92a82ecee7b3bc6e8821b9a0e52e51276..4927d45d59c87c1296b57aaed7b626d1879ceb3e 100644
(file)
--- 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