File: 12-html_fragment_ok.t

package info (click to toggle)
libhtml-lint-perl 2.22%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 356 kB
  • ctags: 87
  • sloc: perl: 1,102; sh: 54; makefile: 20
file content (21 lines) | stat: -rw-r--r-- 631 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use warnings;
use strict;
require 't/LintTest.pl';

# This test passes the HTML into html_ok, which expects a fully-formed
# HTML document.

checkit( [
    [ 'elem-img-alt-missing' => 'Set #1 (4:5) <img src="alpha.jpg"> does not have ALT text defined' ],
    [ 'doc-tag-required'     => 'Set #1 (6:1) <head> tag is required' ],
    [ 'doc-tag-required'     => 'Set #1 (6:1) <html> tag is required' ],
    [ 'doc-tag-required'     => 'Set #1 (6:1) <title> tag is required' ],
], [<DATA>] );

__DATA__
<body>
<p>
    This is a valid fragment, but an incomplete document.
    <img src="alpha.jpg" height="21" width="12">
</p>
</body>