]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/feed: notify user of missing XML::Feed
authorEric Wong <e@80x24.org>
Mon, 21 Apr 2014 20:39:54 +0000 (20:39 +0000)
committerEric Wong <e@80x24.org>
Wed, 23 Apr 2014 01:23:47 +0000 (01:23 +0000)
One of my dev machines did not have XML::Feed so things were
not tested sufficiently.

t/feed.t

index 125490d630528cc2b944e88d0bfc92ca21912fe7..379f8d398fbcead3e31b899af73a3e303bc00412 100644 (file)
--- a/t/feed.t
+++ b/t/feed.t
@@ -53,7 +53,8 @@ EOF
                        git_dir => $git_dir,
                        max => 3
                });
-               if ($have_xml_feed) {
+               SKIP: {
+                       skip 'XML::Feed missing', 2 unless $have_xml_feed;
                        my $p = XML::Feed->parse(\$feed);
                        is($p->format, "Atom", "parsed atom feed");
                        is(scalar $p->entries, 3, "parsed three entries");
@@ -90,7 +91,8 @@ EOF
                        git_dir => $git_dir,
                        max => 3
                });
-               if ($have_xml_feed) {
+               SKIP: {
+                       skip 'XML::Feed missing', 2 unless $have_xml_feed;
                        my $p = XML::Feed->parse(\$spammy_feed);
                        is($p->format, "Atom", "parsed atom feed");
                        is(scalar $p->entries, 3, "parsed three entries");
@@ -115,7 +117,8 @@ EOF
                        git_dir => $git_dir,
                        max => 3
                });
-               if ($have_xml_feed) {
+               SKIP: {
+                       skip 'XML::Feed missing', 2 unless $have_xml_feed;
                        my $p = XML::Feed->parse(\$feed);
                        is($p->format, "Atom", "parsed atom feed");
                        is(scalar $p->entries, 3, "parsed three entries");