Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e894d1d

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 c290221 commit e894d1d

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
@@ -67,6 +67,19 @@ sub run_test
6767
},
6868
$test_master_datadir);
6969
@paths = sort @paths;
70+
71+
# File::Find converts backslashes to slashes in the newer Perl
72+
# versions. To support all Perl versions, do the same conversion
73+
# for Windows before comparing the paths.
74+
if ($PostgreSQL::Test::Utils::windows_os)
75+
{
76+
for my $filename (@paths)
77+
{
78+
$filename =~ s{\\}{/}g;
79+
}
80+
$test_primary_datadir =~ s{\\}{/}g;
81+
}
82+
7083
is_deeply(
7184
\@paths,
7285
[

0 commit comments

Comments
 (0)