File: 20-error-types.t

package info (click to toggle)
libhtml-lint-perl 2.32%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 356 kB
  • sloc: perl: 1,739; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!perl -Tw

use warnings;
use strict;

use Test::More tests => 4;

use HTML::Lint::Error;

my $err = HTML::Lint::Error->new( undef, undef, undef, 'elem-empty-but-closed' );

ok( $err->is_type( HTML::Lint::Error::STRUCTURE ) );
ok( !$err->is_type( HTML::Lint::Error::FLUFF, HTML::Lint::Error::HELPER ) );

$err = HTML::Lint::Error->new( undef, undef, undef, 'attr-unknown' );
ok( $err->is_type( HTML::Lint::Error::FLUFF ) );
ok( !$err->is_type( HTML::Lint::Error::STRUCTURE, HTML::Lint::Error::HELPER ) );