From c7d9f7678de931e580a3fe1bec2fb0e2dead84d3 Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 10 May 2010 21:53:37 +0000 Subject: Improve testsuite README --- tests/README | 31 +++++++++++++++++++------------ 1 file 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/.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 +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/.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 + +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 -- cgit v1.2.3