mirror of
https://github.com/postgres/postgres.git
synced 2026-03-12 05:32:27 -04:00
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
c29022164f
commit
e894d1d829
1 changed files with 13 additions and 0 deletions
|
|
@ -67,6 +67,19 @@ sub run_test
|
|||
},
|
||||
$test_master_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 a new issue