Subject: | t/19die_on_invalid_utf8_rt_58848.t assumes errors will be objects |
Similar to RT 69070, The test in 19die_on_invalid_utf8_rt_58848.t assumes that errors thrown
via $@ will be an object. This causes breaks on older versions of libxml.
Especially since we're stringifying the object anyways, I would suggest this as the revised test:
Subject: | patch.txt |
diff --git a/t/19die_on_invalid_utf8_rt_58848.t b/t/19die_on_invalid_utf8_rt_58848.t
index d0eeb9a..4208a72 100644
--- a/t/19die_on_invalid_utf8_rt_58848.t
+++ b/t/19die_on_invalid_utf8_rt_58848.t
@@ -13,13 +13,8 @@ use XML::LibXML;
XML::LibXML->new->parse_file('example/thedieline.rss');
};
- my $err = $@;
-
- # TEST
- isa_ok($err, 'XML::LibXML::Error', "Exception is XML::LibXML::Error");
-
# TEST
- like ("$err", qr{parser error : Input is not proper UTF-8},
+ like ("$@", qr{parser error : Input is not proper UTF-8},
'Parser error.',
);
}