about summary refs log tree commit
path: root/t/psgi_v2.t
diff options
authorEric Wong <e@yhbt.net>2020-02-06 20:59:45 +0000
committerEric Wong <e@yhbt.net>2020-02-07 07:21:18 +0000
commita3cf35c675217ea60a461dd9be7cc5b55c2d5280 (patch)
treebc35aa6d2dc279f66c9156f6865d80321522786b /t/psgi_v2.t
parent17e52476687e03fecd579f765ad6864cde0f4203 (diff)
XML::Feed pulls in a lot of dependencies, some of which XS.
That makes testing with blead or any non-OS-supplied Perl
installations more time consuming and more difficult because
of the need to have development headers and libraries for
libexpat1 or libxml2.

Performance from libexpat1 or libxml2 for our small tests cases
isn't relevant, either, and the pure Perl XML::TreePP seems up
to the task.  It's also available in CentOS 7.x, FreeBSD 11.x,
and Debian, at least.
Diffstat (limited to 't/psgi_v2.t')
1 files changed, 5 insertions, 5 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index fc825acf..2c9387a4 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -160,11 +160,11 @@ test_psgi(sub { $www->call(@_) }, sub {
         $res = $cb->(GET('/v2test/?q=m:a-mid@b&x=A'));
         is($res->code, 200, 'success with Atom search');
         SKIP: {
-                require_mods(qw(XML::Feed), 2);
-                $raw = $res->content;
-                my $p = XML::Feed->parse(\$raw);
-                is($p->format, "Atom", "parsed atom feed");
-                is(scalar $p->entries, 3, "parsed three entries");
+                require_mods(qw(XML::TreePP), 2);
+                my $t = XML::TreePP->new->parse($res->content);
+                like($t->{feed}->{-xmlns}, qr/\bAtom\b/,
+                        'looks like an an Atom feed');
+                is(scalar @{$t->{feed}->{entry}}, 3, 'parsed three entries');
         local $SIG{__WARN__} = 'DEFAULT';