assertTrue(document.check());
// (1564 open DTs + 1564 open DDs) 1 open P
assertEquals(19, document.getErrors().size());
Jerry doc = Jerry.jerry(FileUtil.readString(file));
assertEquals(16, doc.$("td.NavBarCell1").size());
assertEquals(2, doc.$("table td.NavBarCell1Rev").size());
assertEquals(1, doc.$("dl").size());
assertEquals(1564, doc.$("dd").size());
assertEquals(1564, doc.$("dt").size());
assertEquals(3144, doc.$("dt a").size());
// http://docs.oracle.com/javase/6/docs/api/index-files/index-4.html
file = new File(testDataRoot, "index-4-eng.html");
doc = Jerry.jerry(FileUtil.readString(file));
assertEquals(16, doc.$("td.NavBarCell1").size());
assertEquals(2, doc.$("table td.NavBarCell1Rev").size());
final StringBuilder sb = new StringBuilder();
doc.$("td.NavBarCell1").each(new JerryFunction() {
public boolean onNode(Jerry $this, int index) {
sb.append("---\n");
sb.append($this.text().trim());
sb.append('\n');
return true;