File: api-eof-not-called.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 (21 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!perl

use warnings;
use strict;

use Test::More tests => 3;

use HTML::Lint;
use HTML::Lint::HTML4;


my $lint = HTML::Lint->new;
isa_ok( $lint, 'HTML::Lint', 'Created lint object' );

$lint->newfile( '<DATA>' );
$lint->parse( '<p>Blah blah</p>' );
my @errors = $lint->errors();
cmp_ok( scalar @errors, '>', 0, 'Should get back at least one error' );

my $error = $errors[-1];
is( $error->errcode, 'api-eof-not-called', 'The last error in the list is the API error' );