fix for failing parsing of xml::simple errors

master
Dylan Lloyd 2012-09-30 19:37:02 -04:00
parent b48e603668
commit 06b3e26ce0
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ handle remainder => sub {
# warn $_;
$_ =~ /^\n?(.* at line \d+, column \d+, byte \d+) at/;
$_ =~ /\n?(.* at line \d+, column \d+, byte \d+) at/;
return ('invalid: ', $1);
};

View File

@ -36,8 +36,8 @@ ddg_goodie_test(
ddg_goodie_test(
[qw(DDG::Goodie::IsValid::XML)],
'is valid xml <test>lol' => test_zci(
'Your XML is invalid: no element found at line 1, column 10, byte 9',
html => 'Your XML is invalid: <pre style="font-size:12px;margin-top:5px;">no element found at line 1, column 10, byte 9</pre>'
qr/Your XML is invalid: no element found at line \d{1,2}, column \d{1,2}, byte \d{1,2}/,
html => qr/Your XML is invalid: <pre style="font-size:12px;margin-top:5px;">no element found at line \d{1,2}, column \d{1,2}, byte \d{1,2}<\/pre>/
)
);