| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
|
| 4 |
use Test::More; |
| 5 |
use XML::Feed; |
| 6 |
|
| 7 |
my $content; |
| 8 |
{ |
| 9 |
local $/; |
| 10 |
$content = <DATA>; |
| 11 |
} |
| 12 |
|
| 13 |
my $feed = XML::Feed->parse( \$content ); |
| 14 |
my @links = map { $_->link } $feed->entries; |
| 15 |
|
| 16 |
# RT 53661 - GH #45 |
| 17 |
is_deeply( \@links, ['/earthquakes/recenteqsww/Quakes/us2010rkb8.php'] ) |
| 18 |
or diag explain \@links; |
| 19 |
|
| 20 |
done_testing; |
| 21 |
|
| 22 |
__DATA__ |
| 23 |
<?xml version="1.0"?> |
| 24 |
<feed xml:base="http://earthquake.usgs.gov/" |
| 25 |
xmlns="http://www.w3.org/2005/Atom" |
| 26 |
xmlns:georss="http://www.georss.org/georss"> |
| 27 |
<updated>2010-01-13T17:24:37Z</updated> |
| 28 |
<title>USGS M5+ Earthquakes</title> |
| 29 |
<subtitle>Real-time, worldwide earthquake list for the past 7 |
| 30 |
days</subtitle> |
| 31 |
<link rel="self" href="/earthquakes/catalogs/7day-M5.xml"/> |
| 32 |
<link href="http://earthquake.usgs.gov/earthquakes/"/> |
| 33 |
<author><name>U.S. Geological Survey</name></author> |
| 34 |
<id>http://earthquake.usgs.gov/</id> |
| 35 |
<icon>/favicon.ico</icon> |
| 36 |
<entry><id>urn:earthquake-usgs-gov:us:2010rkb8</id><title>M 5.3, |
| 37 |
Tonga</title><updated>2010-01-13T16:21:24Z</updated><link |
| 38 |
rel="alternate" type="text/html" |
| 39 |
href="/earthquakes/recenteqsww/Quakes/us2010rkb8.php"/><summary |
| 40 |
type="html"><![CDATA[<img |
| 41 |
src="http://earthquake.usgs.gov/images/globes/-15_-175.jpg" |
| 42 |
alt="15.741°S 174.695°W" align="left" hspace="20" |
| 43 |
/><p>Wednesday, January 13, 2010 16:21:24 UTC<br>Thursday, January 14, |
| 44 |
2010 06:21:24 AM at epicenter</p><p><strong>Depth</strong>: 10.00 km |
| 45 |
(6.21 mi)</p>]]></summary><georss:point>-15.7409 |
| 46 |
-174.6951</georss:point><georss:elev>-10000</georss:elev><category |
| 47 |
label="Age" term="Past day"/></entry> |
| 48 |
</feed> |