{"action":"created","issue":{"url":"https://api.github.com/repos/petdance/html-lint/issues/40","repository_url":"https://api.github.com/repos/petdance/html-lint","labels_url":"https://api.github.com/repos/petdance/html-lint/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/petdance/html-lint/issues/40/comments","events_url":"https://api.github.com/repos/petdance/html-lint/issues/40/events","html_url":"https://github.com/petdance/html-lint/issues/40","id":73610999,"number":40,"title":"Test checks for fails in unpredictable order","user":{"login":"Tux","id":2492,"avatar_url":"https://avatars.githubusercontent.com/u/2492?v=3","gravatar_id":"","url":"https://api.github.com/users/Tux","html_url":"https://github.com/Tux","followers_url":"https://api.github.com/users/Tux/followers","following_url":"https://api.github.com/users/Tux/following{/other_user}","gists_url":"https://api.github.com/users/Tux/gists{/gist_id}","starred_url":"https://api.github.com/users/Tux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tux/subscriptions","organizations_url":"https://api.github.com/users/Tux/orgs","repos_url":"https://api.github.com/users/Tux/repos","events_url":"https://api.github.com/users/Tux/events{/privacy}","received_events_url":"https://api.github.com/users/Tux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-05-06T12:57:30Z","updated_at":"2016-10-19T20:23:50Z","closed_at":null,"body":"<pre>t/12-html_fragment_ok.t ......... 1/16\r\n#   Failed test 'Error matches string'\r\n#   at t/LintTest.pl line 36.\r\n#          got: 'Set #1 (6:1) <html> tag is required'\r\n#     expected: 'Set #1 (6:1) <head> tag is required'\r\n\r\n#   Failed test 'Error matches string'\r\n#   at t/LintTest.pl line 36.\r\n#          got: 'Set #1 (6:1) <head> tag is required'\r\n#     expected: 'Set #1 (6:1) <html> tag is required'\r\n# Looks like you failed 2 tests of 16.\r\nt/12-html_fragment_ok.t ......... Dubious, test returned 2 (wstat 512, 0x200)\r\nFailed 2/16 subtests</pre>\r\n<p>Making the order of the tests in the test unambiguous:</p>\r\n<pre>\r\ndiff -purdw HTML-Lint-2.22/t/LintTest.pl HTML-Lint-2.22-r67MGf/t/LintTest.pl\r\n--- HTML-Lint-2.22/t/LintTest.pl        2015-04-02 23:50:54.000000000 +0200\r\n+++ HTML-Lint-2.22-r67MGf/t/LintTest.pl 2015-05-06 14:53:09.333360048 +0200\r\n@@ -18,7 +18,14 @@ sub checkit {\r\n         $lint->eof;\r\n     }\r\n\r\n-    my @errors = $lint->errors();\r\n+    my @errors = sort {\r\n+       $a->{_file}    cmp $b->{_file}    ||\r\n+       $a->{_line}    <=> $b->{_line}    ||\r\n+       $a->{_column}  <=> $b->{_column}  ||\r\n+       $a->{_type}    <=> $b->{_type}    ||\r\n+       $a->{_errcode} cmp $b->{_errcode} ||\r\n+       $a->{_errtext} cmp $b->{_errtext}\r\n+       } $lint->errors();\r\n     is( scalar @errors, scalar @expected, 'Right # of errors' );\r\n\r\n     while ( @errors && @expected ) {\r\ndiff -purdw HTML-Lint-2.22/t/text-use-entity.t HTML-Lint-2.22-r67MGf/t/text-use-entity.t\r\n--- HTML-Lint-2.22/t/text-use-entity.t  2015-03-31 20:12:11.000000000 +0200\r\n+++ HTML-Lint-2.22-r67MGf/t/text-use-entity.t   2015-05-06 14:52:56.382228141 +0200\r\n@@ -5,9 +5,9 @@ require 't/LintTest.pl';\r\n checkit( [\r\n     [ 'text-use-entity'      => qr/Character \"\\\\x0B\" should be written as &#11;/ ],\r\n     [ 'text-use-entity'      => qr/Character \"\\\\xF1\" should be written as &ntilde;/ ],\r\n+    [ 'text-unclosed-entity' => qr/Entity &ouml; is missing its closing semicolon/ ],\r\n     [ 'text-use-entity'      => qr/Character \"&\" should be written as &amp;/ ],\r\n     [ 'text-use-entity'      => qr/Character \"&\" should be written as &amp;/ ],\r\n-    [ 'text-unclosed-entity' => qr/Entity &ouml; is missing its closing semicolon/ ],\r\n ], [<DATA>] );\r\n\r\n __DATA__\r\n</pre>\r\n<p>Causes all the tests to pass</p>"},"comment":{"url":"https://api.github.com/repos/petdance/html-lint/issues/comments/254929723","html_url":"https://github.com/petdance/html-lint/issues/40#issuecomment-254929723","issue_url":"https://api.github.com/repos/petdance/html-lint/issues/40","id":254929723,"user":{"login":"asan13","id":3297311,"avatar_url":"https://avatars.githubusercontent.com/u/3297311?v=3","gravatar_id":"","url":"https://api.github.com/users/asan13","html_url":"https://github.com/asan13","followers_url":"https://api.github.com/users/asan13/followers","following_url":"https://api.github.com/users/asan13/following{/other_user}","gists_url":"https://api.github.com/users/asan13/gists{/gist_id}","starred_url":"https://api.github.com/users/asan13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asan13/subscriptions","organizations_url":"https://api.github.com/users/asan13/orgs","repos_url":"https://api.github.com/users/asan13/repos","events_url":"https://api.github.com/users/asan13/events{/privacy}","received_events_url":"https://api.github.com/users/asan13/received_events","type":"User","site_admin":false},"created_at":"2016-10-19T20:23:50Z","updated_at":"2016-10-19T20:23:50Z","body":"Hi! Also faced with this. The reason seems [here](https://github.com/petdance/html-lint/blob/dev/lib/HTML/Lint/Parser.pm#L105):\r\n\r\n```perl\r\nsub _end_document {\r\n    my ($self,$line,$column) = @_;\r\n\r\n    for my $tag ( sort keys %isRequired ) {\r\n        if ( !$self->{_first_seen}->{$tag} ) {\r\n            $self->gripe( 'doc-tag-required', tag => $tag );\r\n        }\r\n    }\r\n\r\n    return;\r\n}\r\n```"}}
{"actor":{"display_login":"asan13"}}