summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjouni%heikniemi.net <>2004-06-16 20:13:39 +0200
committerjouni%heikniemi.net <>2004-06-16 20:13:39 +0200
commit0bd25a01b546fc6c6bfa1b4d3b1a492b471d396b (patch)
tree53dcb7bc74ae0b61f6aa02c6a48c1c04ac8b5a28
parent30f58d0d6d2bb98b2558b46d9f601d8f614719bb (diff)
downloadbugzilla-0bd25a01b546fc6c6bfa1b4d3b1a492b471d396b.tar.gz
bugzilla-0bd25a01b546fc6c6bfa1b4d3b1a492b471d396b.tar.xz
Bug 142744: Testing suite should work on Win32
Patch by byron jones (glob) <bugzilla@glob.com.au> r=jouni, a=justdave
-rw-r--r--t/008filter.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/008filter.t b/t/008filter.t
index d0654008a..e3d107bf2 100644
--- a/t/008filter.t
+++ b/t/008filter.t
@@ -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