Content-Length: 277606 | pFad | http://github.com/postgrespro/postgres/commit/6ee26c6a4bafabbd22a85f575d2446fd5ec6ad0d

10 Fix 003_extrafiles.pl test for the Windows · postgrespro/postgres@6ee26c6 · GitHub
Skip to content

Commit 6ee26c6

Browse files
committed
Fix 003_extrafiles.pl test for the Windows
File::Find converts backslashes to slashes in the newer Perl versions. See: Perl/perl5@414f14d So, do the same conversion for Windows before comparing paths. To support all Perl versions, always convert them on Windows regardless of the Perl's version. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Backpatch to all live branches
1 parent 8ee9c25 commit 6ee26c6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/bin/pg_rewind/t/003_extrafiles.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ sub run_test
7878
},
7979
$test_primary_datadir);
8080
@paths = sort @paths;
81+
82+
# File::Find converts backslashes to slashes in the newer Perl
83+
# versions. To support all Perl versions, do the same conversion
84+
# for Windows before comparing the paths.
85+
if ($PostgreSQL::Test::Utils::windows_os)
86+
{
87+
for my $filename (@paths)
88+
{
89+
$filename =~ s{\\}{/}g;
90+
}
91+
$test_primary_datadir =~ s{\\}{/}g;
92+
}
93+
8194
is_deeply(
8295
\@paths,
8396
[

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/6ee26c6a4bafabbd22a85f575d2446fd5ec6ad0d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy