diff options
author | Sven Nierlein <sven@nierlein.de> | 2014-12-28 13:48:02 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2014-12-28 13:48:02 +0100 |
commit | 0f6dcbe3e653fbb92b52ac42b2a9564953983c1f (patch) | |
tree | 7cd0ca00afddcfe5752ada0571c01f68841d1176 | |
parent | 93537ecfecff5b39364892643ab7ac6497299dab (diff) | |
download | monitoring-plugin-perl-0f6dcbe3e653fbb92b52ac42b2a9564953983c1f.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.t | 5 |
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); |