Permalink
Browse files

Cleaned up tests for XHTML->HTML rename.

  • Loading branch information...
chromatic committed Mar 24, 2012
1 parent 5bb05ca commit 126dea4fd583cba0790f1774280c8da7899463cc
@@ -175,13 +175,8 @@ sub emit_body
{
my $self = shift;
return <<END_HTML_HEAD . $self->emit_kids( @_ ) . <<END_HTML;
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<html>
<head>
-<title></title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/style.css" type="text/css" />
</head>
<body>
View
@@ -3,21 +3,21 @@ use warnings;
use Test::More;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use_ok('Pod::PseudoPod::DOM') or exit;
my $parser = Pod::PseudoPod::DOM->new(
- formatter_role => 'Pod::PseudoPod::DOM::Role::XHTML'
+ formatter_role => 'Pod::PseudoPod::DOM::Role::HTML'
);
isa_ok $parser, 'Pod::PseudoPod::DOM';
my $result = parse( "=head0 Narf!" );
-like $result, qr|<a name="Narf!"></a><h1 id="narf">Narf!</h1>\n\n|,
+like $result, qr|<a name="Narf%21"></a><h1 id="narf">Narf!</h1>\n\n|,
"head0 level output";
$result = parse( "=head1 Poit!" );
-like $result, qr|<a name="Poit!"></a><h2 id="poit">Poit!</h2>\n\n|,
+like $result, qr|<a name="Poit%21"></a><h2 id="poit">Poit!</h2>\n\n|,
"head1 level output";
$result = parse( "=head2 I think so Brain." );
@@ -27,12 +27,12 @@ like $result,
$result = parse( "=head3 I say, Brain..." );
like $result,
- qr|<a name="Isay,Brain..."></a><h4 id="isaybrain">I say, Brain...</h4>\n\n|,
+ qr|<a name="Isay%2CBrain..."></a><h4 id="isaybrain">I say, Brain...</h4>\n|,
"head3 level output";
$result = parse( "=head4 Zort!" );
like $result,
- qr|<a name="Zort!"></a><h5 id="zort">Zort!</h5>\n\n|,
+ qr|<a name="Zort%21"></a><h5 id="zort">Zort!</h5>\n\n|,
"head4 level output";
@@ -199,7 +199,7 @@ EOPOD
is $result, <<"EOHTML", "adding html body tags";
<html>
<head>
-<link rel="stylesheet" href="style.css" type="text/css" />
+<link rel="stylesheet" href="../css/style.css" type="text/css" />
</head>
<body>
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Slurp;
use File::Spec::Functions;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Slurp;
use File::Spec::Functions;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
@@ -59,37 +59,37 @@ like_string $result, qr/ineffable/, 'ff ligature also gets no marking';
like_string $result, qr/ligatures&mdash;and/,
'spacey double dash should become a real emdash';
-like_string $result, qr/<a name="negation!operator1">/,
- '! is fine as-is in index anchor';
+like_string $result, qr/<a name="negation%21operator1">/,
+ '! needs URI encoding in index anchor';
-like_string $result, qr/<a name="array\@sigil1">/,
- '@ is also fine as-is in index anchor';
+like_string $result, qr/<a name="array%40sigil1">/,
+ '@ needs URI encoding in index anchor';
like_string $result, qr/<a name="thepipe|1">/,
'spaces removed from index anchors';
like_string $result, qr/<a name="strangequoteaa1">/,
'quotes removed from index anchors';
-like_string $result, qr/<a name="\$\^W;carats1">/,
- '... carat gets no special treatment in anchor';
+like_string $result, qr/<a name="%24%5EW%3Bcarats1">/,
+ '... carat needs URI encoding in anchor';
-like_string $result, qr/<a name="hierarchicalterms;omittingtrailingspaces1">/,
+like_string $result, qr/<a name="hierarchicalterms%3Bomittingtrailingspaces1">/,
'trailing spaces in hierarchical terms should be ignored';
like_string $result, qr/<a name="codeanditalicstext1">/,
'... and code/italics formatting';
-like_string $result, qr/<a name="&lt;=&gt;;numericcomparisonoperator1">/,
+like_string $result, qr/<a name="%3C%3D%3E%3Bnumericcomparisonoperator1">/,
'... and should escape <> symbols';
-like_string $result, qr/<a name="sigils;&amp;1">/,
+like_string $result, qr/<a name="sigils%3B%261">/,
'... in index anchors as well';
like_string $result, qr/<a name="\.tfiles1">/,
'... and should suppress HTML tags in index anchors';
-like_string $result, qr/<a name="operators;&lt;1">/,
+like_string $result, qr/<a name="operators%3B&lt;1">/,
'... encoding entities as necessary';
like_string $result, qr/<code>&lt;=&gt;<\/code>/,
View
@@ -3,12 +3,12 @@ use warnings;
use Test::More;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use_ok('Pod::PseudoPod::DOM') or exit;
my $parser = Pod::PseudoPod::DOM->new(
- formatter_role => 'Pod::PseudoPod::DOM::Role::XHTML'
+ formatter_role => 'Pod::PseudoPod::DOM::Role::HTML'
);
isa_ok $parser, 'Pod::PseudoPod::DOM';
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
View
@@ -3,12 +3,12 @@ use warnings;
use Test::More;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use_ok('Pod::PseudoPod::DOM') or exit;
my $parser = Pod::PseudoPod::DOM->new(
- formatter_role => 'Pod::PseudoPod::DOM::Role::XHTML'
+ formatter_role => 'Pod::PseudoPod::DOM::Role::HTML'
);
isa_ok $parser, 'Pod::PseudoPod::DOM';
View
@@ -7,7 +7,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use Pod::PseudoPod::DOM::App;
use File::Spec::Functions;
use File::Slurp;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Slurp;
use File::Spec::Functions;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
View
@@ -5,7 +5,7 @@ use Test::More;
use Test::LongString;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
View
@@ -4,7 +4,7 @@ use warnings;
use Test::More;
use lib 't/lib';
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Spec::Functions;
use File::Slurp;
View
@@ -5,7 +5,7 @@ use lib 't/lib';
use Test::More;
use Test::LongString;
-use TestDOM 'Pod::PseudoPod::DOM::Role::XHTML';
+use TestDOM 'Pod::PseudoPod::DOM::Role::HTML';
use File::Slurp;
use File::Spec::Functions;

0 comments on commit 126dea4

Please sign in to comment.