summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2014-12-28 12:48:02 (GMT)
committerSven Nierlein <sven@nierlein.de>2014-12-28 12:48:02 (GMT)
commit0f6dcbe3e653fbb92b52ac42b2a9564953983c1f (patch)
tree7cd0ca00afddcfe5752ada0571c01f68841d1176
parent93537ecfecff5b39364892643ab7ac6497299dab (diff)
downloadmonitoring-plugin-perl-0f6dcbe.tar.gz
fix test in windows
on windows backslashes are expected instead of forward slashes. fixes https://rt.cpan.org/Ticket/Display.html?id=100708 Signed-off-by: Sven Nierlein <sven@nierlein.de>
-rw-r--r--t/Monitoring-Plugin-Getopt-03.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/Monitoring-Plugin-Getopt-03.t b/t/Monitoring-Plugin-Getopt-03.t
index 6490145..bcf324e 100644
--- a/t/Monitoring-Plugin-Getopt-03.t
+++ b/t/Monitoring-Plugin-Getopt-03.t
@@ -97,7 +97,10 @@ for my $infile (glob File::Spec->catfile($tdir, 'input', $glob)) {
97 if ($@) { 97 if ($@) {
98 chomp $@; 98 chomp $@;
99 ok($infile =~ m/_(dies?|catch)$/, "$infile ($@)"); 99 ok($infile =~ m/_(dies?|catch)$/, "$infile ($@)");
100 is($@, $EXPECTED{$infile}, $infile) if ($infile =~ m/_catch$/); 100 my $expect = $EXPECTED{$infile};
101 # windows expects backslashes fixes rt.cpan #100708
102 $expect =~ s#/#\\#gmx if $^O =~ m/^MSWin/;
103 is($@, $expect, $infile) if ($infile =~ m/_catch$/);
101 } 104 }
102 else { 105 else {
103 is($plugin . ' ' . $ng->_cmdline, $EXPECTED{$infile}, $infile); 106 is($plugin . ' ' . $ng->_cmdline, $EXPECTED{$infile}, $infile);