• Andrew Balholm's avatar
    exp/html: more comprehensive tests · 9a6cef8b
    Andrew Balholm authored
    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
    9a6cef8b
tests1.dat.log 6.4 KB