Mercurial > hg > chronicle
comparison tests/html-validator.t @ 201:f107f6107ad4
Ignore errors which relate to <cut> tag
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Mon, 14 Apr 2008 19:01:56 +0100 |
parents | 918bfcb2787e |
children |
comparison
equal
deleted
inserted
replaced
200:1dc051bcbe0c | 201:f107f6107ad4 |
---|---|
7 | 7 |
8 | 8 |
9 use File::Find; | 9 use File::Find; |
10 use HTML::Lint; | 10 use HTML::Lint; |
11 use Test::More; | 11 use Test::More; |
12 | |
13 | 12 |
14 # | 13 # |
15 # Basically this test validates the HTML which would be produced if | 14 # Basically this test validates the HTML which would be produced if |
16 # a blog is compiled - if one is not present then we have nothing to | 15 # a blog is compiled - if one is not present then we have nothing to |
17 # validate against. | 16 # validate against. |
54 | 53 |
55 $lint->parse_file( $file ); | 54 $lint->parse_file( $file ); |
56 | 55 |
57 my $error_count = $lint->errors; | 56 my $error_count = $lint->errors; |
58 | 57 |
59 # foreach my $error ( $lint->errors ) { | 58 foreach my $error ( $lint->errors ) { |
60 # print $error->as_string, "\n"; | 59 if ( $error->as_string =~ /<cut>/ ) |
61 # } | 60 { |
61 $error_count -= 1; | |
62 } | |
63 #print $error->as_string, "\n"; | |
64 } | |
62 | 65 |
63 is( $error_count, 0 , "There are no errors in $file" ); | 66 is( $error_count, 0 , "There are no errors in $file" ); |
64 } | 67 } |
65 | 68 |
66 | 69 |