mirror of https://github.com/postgres/postgres
Fix 003_extrafiles.pl test for the Windows
File::Find converts backslashes to slashes in the newer Perl versions.
See: 414f14df98
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
This commit is contained in:
parent
8ee9c25087
commit
6ee26c6a4b
|
@ -78,6 +78,19 @@ sub run_test
|
|||
},
|
||||
$test_primary_datadir);
|
||||
@paths = sort @paths;
|
||||
|
||||
# File::Find converts backslashes to slashes in the newer Perl
|
||||
# versions. To support all Perl versions, do the same conversion
|
||||
# for Windows before comparing the paths.
|
||||
if ($PostgreSQL::Test::Utils::windows_os)
|
||||
{
|
||||
for my $filename (@paths)
|
||||
{
|
||||
$filename =~ s{\\}{/}g;
|
||||
}
|
||||
$test_primary_datadir =~ s{\\}{/}g;
|
||||
}
|
||||
|
||||
is_deeply(
|
||||
\@paths,
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue