From 5abf499dad8a9c724cd58ad5255deb5f0c6b368f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 27 Apr 2012 15:09:18 -0700 Subject: Updated INSTALL instructions for tests. --- INSTALL | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 4e08a382b..94627de05 100644 --- a/INSTALL +++ b/INSTALL @@ -134,21 +134,27 @@ This is essentially what the binary installer does. Running tests ------------- -Pandoc comes with an automated test suite integrated to cabal. Data -files are located under the 'tests' directory. If you implement a new -feature, please update them to improve covering, and make sure by any -necessary mean that the new reference native file is 100% correct. +Pandoc comes with an automated test suite integrated to cabal. +To enable the tests, compile pandoc with the `tests` flag: -Also, tests require templates that leave in a separate git repository, -tied into the main one as a git submodule. To populate 'template' -directory, you must therefore run first : + cabal install -ftests + +Note: If you obtained the source via git, you should first do git submodule update --init templates -You are now ready to build tests : +to populate the templates subdirectory. (You can skip this step +if you obtained the source from a release tarball.) + +To run the tests: - cabal-dev install -ftests + cabal test -And finally run them ! +If you add a new feature to pandoc, please add tests as well, following +the pattern of the existing tests. The test suite code is in +`src/test-pandoc.hs`. If you are adding a new reader or writer, it is +probably easiest to add some data files to the `tests` directory, and +modify `src/Tests/Old.hs`. Otherwise, it is better to modify the module +under the `src/Tests` hierarchy corresponding to the pandoc module you +are changing. - cabal-dev test -- cgit v1.2.3