diff options
author | David Waern <david.waern@gmail.com> | 2010-05-10 21:53:37 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-05-10 21:53:37 +0000 |
commit | c7d9f7678de931e580a3fe1bec2fb0e2dead84d3 (patch) | |
tree | a6a91e0711502c8faf207ad5f85315d831f2757d | |
parent | a4926886ee8cc35e122a502903cb834a025773f4 (diff) |
Improve testsuite README
-rw-r--r-- | tests/README | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/tests/README b/tests/README index 567c3b61..5c5bef60 100644 --- a/tests/README +++ b/tests/README @@ -1,21 +1,28 @@ -This is a little output test suit for Haddock. To add a test: - 1 Create a module in the "tests" directory - 2 Run runtests.hs - You should now have output/<modulename>.html but the test will always - pass since there is no reference output to compare with - 3 To add reference output, do - runhaskell copy.hs <modulename> +A testsuite for Haddock that uses the concept of "golden files" (compares +output files against a set of reference files). -Tips: +To add a new test: -You can do + 1) Create a module in the "tests" directory. + + 2) Run runtests.hs. You should now have output/<modulename>.html. The test + passes since there is no reference file to compare with. + + 3) To make a reference file from the output file, do + runhaskell copy.hs <modulename> + +Tips and tricks: + +You can runhaskell copy.hs -to copy all output into reference files -You can do +to copy all output files into reference files. + +You can runhaskell runtests.hs all -to continue despite a failing test + +to continue despite a failing test. You can pass extra options to haddock like so runhaskell runtests.hs --xhtml all |