summaryrefslogtreecommitdiffstats
path: root/t/008filter.t
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-09-04 23:08:05 +0200
committermkanat%bugzilla.org <>2009-09-04 23:08:05 +0200
commitccaf82a249d988a9192034b5afa33b754aefd379 (patch)
treedba9420d26b014b5afe4e59f3a6010ca93b11152 /t/008filter.t
parent120fc1b9be07ee44c98a9ec2c5c64568e9ebccbd (diff)
downloadbugzilla-ccaf82a249d988a9192034b5afa33b754aefd379.tar.gz
bugzilla-ccaf82a249d988a9192034b5afa33b754aefd379.tar.xz
Bug 224588: Unify ($^O =~ /MSWin/) checks (always use ON_WINDOWS)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 't/008filter.t')
-rw-r--r--t/008filter.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/008filter.t b/t/008filter.t
index ec9e21f51..5a9e48bac 100644
--- a/t/008filter.t
+++ b/t/008filter.t
@@ -30,10 +30,11 @@
# Sample exploit code: '>"><script>alert('Oh dear...')</script>
use strict;
-use lib 't';
+use lib qw(. lib t);
use vars qw(%safe);
+use Bugzilla::Constants;
use Support::Templates;
use File::Spec;
use Test::More tests => $Support::Templates::num_actual_files;
@@ -45,7 +46,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 =~ s|\\|/|g if ON_WINDOWS; # convert \ to / in path if on windows
$path =~ m|template/([^/]+)/([^/]+)|;
my $lang = $1;
my $flavor = $2;
@@ -66,7 +67,7 @@ foreach my $path (@Support::Templates::include_paths) {
}
else {
do "filterexceptions.pl";
- if ($^O eq 'MSWin32') {
+ if (ON_WINDOWS) {
# filterexceptions.pl uses / separated paths, while
# find_actual_files returns \ separated ones on Windows.
# Here, we convert the filter exception hash to use \.