]> Cypherpunks repositories - gostls13.git/commit
exp/html: more comprehensive tests
authorAndrew Balholm <andybalholm@gmail.com>
Tue, 17 Apr 2012 07:17:22 +0000 (17:17 +1000)
committerNigel Tao <nigeltao@golang.org>
Tue, 17 Apr 2012 07:17:22 +0000 (17:17 +1000)
commit9a6cef8bbf1d62cbeb786f7a3eb9c009ab190ec9
tree94941f974605eac4f9a823cab48a23c56c511c03
parentb20163e9e48fe300112de18f75cfa77c04968f2a
exp/html: more comprehensive tests

Currently, the html package only runs a limited subset of the tests
in the testdata directory. This tends to limit development of the
parser to fixing the bug that causes the first failing test.

This CL gives it the ability to run all the tests and produce a
log showing the status of each test. (It does it when tests are run with
'go test --update-logs') The status is listed as PASS, FAIL, or PARSE
(PARSE means that parsing produced the correct tree, but rendering and
re-parsing does not produce the same tree).

When 'go test' is run without --update-logs, it runs the tests marked
'PASS' in the logs (and the parsing portion of the tests marked 'PARSE').
Thus it will fail if there has been a regression since the last
time the logs were updated.

My goal for this CL is to allow develoment of the html package to
be less test-driven, while still having the advantages of regression
tests. In other words, one can work on any portion of the parser
and quickly see whether he is breaking things or improving them.

Current statistics of the tests:
$ grep ^PASS *.log|wc -l
        1017
$ grep ^PARSE *.log|wc -l
          46
$ grep ^FAIL *.log|wc -l
         181

R=nigeltao
CC=golang-dev
https://golang.org/cl/6031049
44 files changed:
src/pkg/exp/html/parse_test.go
src/pkg/exp/html/testlogs/adoption01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/adoption02.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/comments01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/doctype01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/entities01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/entities02.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/html5test-com.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/inbody01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/isindex.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/pending-spec-changes-plain-text-unsafe.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/pending-spec-changes.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/plain-text-unsafe.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/scriptdata01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tables01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests1.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests10.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests11.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests12.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests14.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests15.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests16.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests17.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests18.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests19.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests2.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests20.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests21.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests22.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests23.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests24.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests25.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests26.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests3.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests4.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests5.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests6.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests7.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests8.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests9.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tests_innerHTML_1.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/tricky01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/webkit01.dat.log [new file with mode: 0644]
src/pkg/exp/html/testlogs/webkit02.dat.log [new file with mode: 0644]