diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index fd2bee5d20..d0840dcbe3 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -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, [