Validator.nu Unit Tests
Validator.nu has various places for unit tests.
html5lib Tokenizer Tests
The tokenizer of the Validator.nu HTML Parser is tested using the tokenizer tests hosted by the html5lib project.
nu.validator.htmlparser.test.TokenizerTester is the test harness.
html5lib Tree Builder Tests
The tree builder of the Validator.nu HTML Parser is tested using the tree construction tests hosted by the html5lib project.
nu.validator.htmlparser.test.TreeTester is the test harness.
html5lib Encoding Tests
The meta sniffer of Validator.nu HTML Parser used to be tested using the encoding tests hosted by the html5lib project.
nu.validator.htmlparser.test.EncodingTester is the test harness. However, both the tests and the code are out of sync with the spec.
WHATTF Schema Tests
Some aspects of the validation layer are tested using the test suite the WHATTF HTML5 schemas.
org.whattf.syntax.Driver.java is the test harness. These tests were written when HTML5 still had the concept strict inline / structured inline / block. Also the tests elicit more than one error per test file. The test have not been properly updated to test newer aspects of the HTML5 spec.