This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Pod::Html's feature2.t needs to match path separators portably.
[perl5.git] / ext / Pod-Html / t / feature2.t
1 #!/usr/bin/perl -w                                         # -*- perl -*-
2
3
4 BEGIN {
5     require "t/pod2html-lib.pl";
6 }
7
8 use strict;
9 use Cwd;
10 use Test::More tests => 2;
11
12 my $cwd = cwd();
13
14 my $warn;
15 $SIG{__WARN__} = sub { $warn .= $_[0] };
16
17 convert_n_test("feature2", "misc pod-html features 2", 
18  "--backlink",
19  "--header",
20  "--podpath=.",
21  "--podroot=$cwd",
22  "--norecurse",
23  "--verbose",
24  "--quiet",
25  );
26
27 like($warn,
28     qr(
29         \Acaching\ directories\ for\ later\ use\n
30         Converting\ input\ file\ \S+[/\\\]]feature2\.pod\n\z    
31     )x,
32     "misc pod-html --verbose warnings");
33
34 __DATA__
35 <?xml version="1.0" ?>
36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
37 <html xmlns="http://www.w3.org/1999/xhtml">
38 <head>
39 <title></title>
40 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
41 <link rev="made" href="mailto:[PERLADMIN]" />
42 </head>
43
44 <body id="_podtop_" style="background-color: white">
45 <table border="0" width="100%" cellspacing="0" cellpadding="3">
46 <tr><td class="_podblock_" style="background-color: #cccccc" valign="middle">
47 <big><strong><span class="_podblock_">&nbsp;</span></strong></big>
48 </td></tr>
49 </table>
50
51
52
53 <ul id="index">
54   <li><a href="#Head-1">Head 1</a></li>
55   <li><a href="#Another-Head-1">Another Head 1</a></li>
56 </ul>
57
58 <a href="#_podtop_"><h1 id="Head-1">Head 1</h1></a>
59
60 <p>A paragraph</p>
61
62
63
64 some html
65
66 <p>Another paragraph</p>
67
68 <a href="#_podtop_"><h1 id="Another-Head-1">Another Head 1</h1></a>
69
70 <p>some text and a link <a>crossref</a></p>
71
72 <table border="0" width="100%" cellspacing="0" cellpadding="3">
73 <tr><td class="_podblock_" style="background-color: #cccccc" valign="middle">
74 <big><strong><span class="_podblock_">&nbsp;</span></strong></big>
75 </td></tr>
76 </table>
77
78 </body>
79
80 </html>
81
82