summaryrefslogtreecommitdiff
path: root/t/headparser-http.t
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2013-05-08 22:21:52 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2013-05-08 22:21:52 +0000
commit2f253cfc85ffd55a8acb988e91f0bc5ab348124c (patch)
tree4734ccd522c71dd455879162006742002f8c1565 /t/headparser-http.t
downloadHTML-Parser-tarball-master.tar.gz
Diffstat (limited to 't/headparser-http.t')
-rw-r--r--t/headparser-http.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/headparser-http.t b/t/headparser-http.t
new file mode 100644
index 0000000..b722c64
--- /dev/null
+++ b/t/headparser-http.t
@@ -0,0 +1,20 @@
+use Test::More tests => 1;
+
+eval {
+ require HTML::HeadParser;
+ $p = HTML::HeadParser->new;
+};
+
+SKIP: {
+skip $@, 1 if $@ =~ /^Can't locate HTTP/;
+
+$p = HTML::HeadParser->new($h);
+$p->parse(<<EOT);
+<title>Stupid example</title>
+<base href="http://www.sn.no/libwww-perl/">
+Normal text starts here.
+EOT
+$h = $p->header;
+undef $p;
+is($h->title, "Stupid example");
+}