mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03: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:
		@@ -78,6 +78,19 @@ sub run_test
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		$test_primary_datadir);
 | 
							$test_primary_datadir);
 | 
				
			||||||
	@paths = sort @paths;
 | 
						@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(
 | 
						is_deeply(
 | 
				
			||||||
		\@paths,
 | 
							\@paths,
 | 
				
			||||||
		[
 | 
							[
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user