From 0f6dcbe3e653fbb92b52ac42b2a9564953983c1f Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sun, 28 Dec 2014 13:48:02 +0100 Subject: 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 --- t/Monitoring-Plugin-Getopt-03.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) { if ($@) { chomp $@; ok($infile =~ m/_(dies?|catch)$/, "$infile ($@)"); - is($@, $EXPECTED{$infile}, $infile) if ($infile =~ m/_catch$/); + my $expect = $EXPECTED{$infile}; + # windows expects backslashes fixes rt.cpan #100708 + $expect =~ s#/#\\#gmx if $^O =~ m/^MSWin/; + is($@, $expect, $infile) if ($infile =~ m/_catch$/); } else { is($plugin . ' ' . $ng->_cmdline, $EXPECTED{$infile}, $infile); -- cgit v1.2.3-74-g34f1