File: elem-img-alt-missing.t

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

checkit( [
    [ 'elem-img-alt-missing' => qr/<IMG SRC="whizbang\.jpg"> does not have ALT text defined/i ],
], [<DATA>] );
    
__DATA__
<HTML>
    <HEAD>
	<TITLE>Test stuff</TITLE>
    </HEAD>
    <BODY BGCOLOR="white">
	<P ALIGN=RIGHT>This is my paragraph</P>
	<IMG SRC="whizbang.jpg" BORDER=3 HEIGHT=4 WIDTH=921>
    </BODY>
</HTML>