]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 142744: Testing suite should work on Win32
authorjouni%heikniemi.net <>
Wed, 16 Jun 2004 18:13:39 +0000 (18:13 +0000)
committerjouni%heikniemi.net <>
Wed, 16 Jun 2004 18:13:39 +0000 (18:13 +0000)
Patch by byron jones (glob) <bugzilla@glob.com.au>
r=jouni, a=justdave

t/008filter.t

index d0654008a532fe217540c9001c01ca6d2e1da96b..e3d107bf29766501312120918cadc83beffd0d37 100644 (file)
@@ -45,6 +45,7 @@ my $topdir = cwd;
 $/ = undef;
 
 foreach my $path (@Support::Templates::include_paths) {
+    $path =~ s|\\|/|g if $^O eq 'MSWin32';  # convert \ to / in path if on windows
     $path =~ m|template/([^/]+)/([^/]+)|;
     my $lang = $1;
     my $flavor = $2;
@@ -65,6 +66,17 @@ foreach my $path (@Support::Templates::include_paths) {
     }
     else {
         do "filterexceptions.pl";
+        if ($^O eq 'MSWin32') {
+          # filterexceptions.pl uses / separated paths, while 
+          # find_actual_files returns \ separated ones on Windows.
+          # Here, we convert the filter exception hash to use \.
+          foreach my $file (keys %safe) {
+            my $orig_file = $file;
+            $file =~ s|/|\\|g;
+            $safe{$file} = $safe{$orig_file};
+            delete $safe{$orig_file};
+          }
+        }
     }
     
     # We preprocess the %safe hash of lists into a hash of hashes. This allows