File: venus.t

package info (click to toggle)
libhtml-tidy-perl 1.60-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 472 kB
  • sloc: perl: 1,289; sh: 23; makefile: 7
file content (95 lines) | stat: -rwxr-xr-x 2,845 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!perl -T

use warnings;
use strict;

use Test::More tests => 2;

use HTML::Tidy;

my $filename = 't/venus.html';
open( my $fh, '<', $filename ) or die "Can't open $filename: $!\n";
my $raw = do { local $/ = undef; <$fh> };
close $fh;

my $cfg = 't/venus.cfg';
my $tidy = HTML::Tidy->new( {config_file => $cfg} );
isa_ok( $tidy, 'HTML::Tidy' );

my $cooked = $tidy->clean( $raw );
my @cooked = split( /\n/, $cooked );
chomp @cooked;

my @expected = <DATA>;
chomp @expected;
is_deeply( \@cooked, \@expected, 'Cooked stuff looks like what we expected' );

__DATA__
<html>
  <head>
    <meta name="GENERATOR" content="Adobe PageMill 3.0 Mac" />
    <title>Venus Flytrap for 100 Question</title>
  </head>
  <body bgcolor="#FFFFFF" link="#5B3D23" alink="#8C6136" vlink="#BE844A" background="../../WetlandGraphics/PaperBG.gif">
    <center>
      <h1>
        <img src="../../WetlandGraphics/KildeerLogo2.gif" width="345" height="21" align="bottom" border="0" />
      </h1>
    </center>
    <center>
      <h1>Wetland Plants Jeopardy</h1>
    </center>
    <center>
      <h1>
        <font color="#ED181E">Venus Flytrap for 100</font>
      </h1>
    </center>
    <center>
      <h1>
        <img src="ST100.gif" width="100" height="101" align="bottom" />
      </h1>
    </center>
    <p> </p>
    <center>
      <h2>
      <font color="#ED181E">Question:</font> What does the Venus Flytrap feed on?</h2>
    </center>
    <center>
      <h4>
        <a href="Venus100Ans.html">Click here for the answer.</a>
      </h4>
    </center>
    <center>
      <h4>
        <img src="../../WetlandGraphics/GoldbarThread.gif" width="648" height="4" align="bottom" />
      </h4>
    </center>
    <center>
      <h4>| 
      <a href="../../General/Map.html">Map</a> | 
      <a href="../../General/SiteSearch.html">Site Search</a> | 
      <a href="../../General/Terms.html">Terms</a> | 
      <a href="../../General/Credits.html">Credits</a> | 
      <a href="../../General/Feedback.html">Feedback</a> |</h4>
    </center>
    <address>
      <center>
        <p>
          <img src="../../WetlandGraphics/GoldbarThread.gif" width="648" height="4" align="bottom" />
        </p>
      </center>
      <div align="center"></div>
      <address>
        <center>
          <address>Created for the Museums in the Classroom program sponsored by Illinois State Board of Education, the Brookfield Zoo, the Illinois State Museum., and Kildeer Countryside CCSD 96.</address>
          <address> </address>
          <address>Authors: Twin Groves Museums in the Classroom Team,</address>
          <address>School: Twin Groves Junior High School, Buffalo Grove, Illinois 60089</address>
        </center>
      </address>
      <address>
        <center>Created: 27 June 1998- Updated: 6 October 2003</center>
      </address>
    </address>
  </body>
</html>