Permalink
Browse files

Updated INSTALL instructions for tests.

  • Loading branch information...
jgm committed Apr 27, 2012
1 parent 4b77def commit 5abf499dad8a9c724cd58ad5255deb5f0c6b368f
Showing with 17 additions and 11 deletions.
  1. +17 −11 INSTALL
View
28 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

0 comments on commit 5abf499

Please sign in to comment.