~ubuntu-branches/ubuntu/quantal/libtest-www-mechanize-perl/quantal

« back to all changes in this revision

Viewing changes to t/autolint.t

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-10-27 18:26:26 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20111027182626-ic0eh8ri0p1u5wnh
Tags: 1.36-1
* New upstream release.
* Use XZ compression for source and binary packages.
* debian/control: Convert Vcs-* fields to Git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!perl -Tw
 
1
#!/usr/bin/env perl -T
2
2
 
3
3
use strict;
4
4
use warnings;
5
5
use Test::Builder::Tester;
6
6
use Test::More;
7
7
use URI::file;
 
8
use HTML::Lint;
8
9
 
9
10
BEGIN {
10
11
    eval 'use HTML::Lint';
11
12
    plan skip_all => 'HTML::Lint is not installed, cannot test autolint' if $@;
12
 
    plan tests => 7;
 
13
    plan tests => 8;
13
14
}
14
15
 
15
16
BEGIN {
16
17
    use_ok( 'Test::WWW::Mechanize' );
17
18
}
18
19
 
 
20
CUSTOM_LINTER: {
 
21
    my $lint = HTML::Lint->new( only_types => HTML::Lint::Error::STRUCTURE );
 
22
 
 
23
    my $mech = Test::WWW::Mechanize->new( autolint => $lint );
 
24
    isa_ok( $mech, 'Test::WWW::Mechanize' );
 
25
}
 
26
 
19
27
GOOD_GET_GOOD_HTML: {
20
28
    my $mech = Test::WWW::Mechanize->new( autolint => 1 );
21
29
    isa_ok( $mech, 'Test::WWW::Mechanize' );