File: 50-multiple-files.t

package info (click to toggle)
libhtml-lint-perl 2.20%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 304 kB
  • ctags: 64
  • sloc: perl: 1,014; sh: 48; makefile: 20
file content (46 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use warnings;
use strict;

require 't/LintTest.pl';

my @files = get_paragraphed_files();

checkit( [
    [ 'elem-unopened' => qr/<\/p> with no opening <P>/i ],

    [ 'elem-unclosed' => qr/<b> at \(6:5\) is never closed/i ],
    [ 'elem-unclosed' => qr/<i> at \(7:5\) is never closed/i ],

    [ 'elem-unopened' => qr/<\/b> with no opening <B>/i ],
], @files );

__DATA__
<HTML> <!-- for elem-unopened -->
    <HEAD>
	<TITLE>Test stuff</TITLE>
    </HEAD>
    <BODY BGCOLOR="white">
	This is my paragraph</P>
    </BODY>
</HTML>

<HTML>
    <HEAD> <!-- Checking for elem-unclosed -->
	<TITLE>Test stuff</TITLE>
    </HEAD>
    <BODY BGCOLOR="white">
	<P><B>This is my paragraph</P>
	<P><I>This is another paragraph</P>
    </BODY>
</HTML>

<!-- based on doc-tag-required -->
<HTML>
    <HEAD>
	<TITLE>Test stuff</TITLE>
    </HEAD>
    <BODY BGCOLOR="white">
        </B>Gratuitous unnecessary closing tag that does NOT match to the opening [B] above.
	<P>This is my paragraph</P>
    </BODY>
</HTML>