Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 8009f7c7283d3485496902864ab407df > files > 28

perl-HTML-Tidy-1.08-6.fc13.i686.rpm

#!/usr/bin/perl -Tw

use warnings;
use strict;

use Test::More tests => 4;

BEGIN {
    use_ok( 'HTML::Tidy' );
}

my $html = join '', <DATA>;

my $tidy = HTML::Tidy->new;
isa_ok( $tidy, 'HTML::Tidy' );

$tidy->parse( '-', $html );

my @messages = $tidy->messages;
is( scalar @messages, 5, 'Right number of initial messages' );

$tidy->clear_messages;
is( scalar $tidy->messages, 0, 'Cleared the messages' );

__DATA__
<html>
    <body><head>blah blah</head>
        <title>Barf</title>
        <body>
            <p>more blah
            </P>
        </body>
    </html>