@@ -134,21 +134,27 @@ This is essentially what the binary installer does.
134134Running tests
135135-------------
136136
137−Pandoc comes with an automated test suite integrated to cabal. Data
138−files are located under the 'tests' directory. If you implement a new
139−feature, please update them to improve covering, and make sure by any
140−necessary mean that the new reference native file is 100% correct.
137+Pandoc comes with an automated test suite integrated to cabal.
138+To enable the tests, compile pandoc with the `tests` flag:
141139
142−Also, tests require templates that leave in a separate git repository,
143−tied into the main one as a git submodule. To populate 'template'
144−directory, you must therefore run first :
140+ cabal install -ftests
141+
142+Note: If you obtained the source via git, you should first do
145143
146144 git submodule update --init templates
147145
148−You are now ready to build tests :
146+to populate the templates subdirectory. (You can skip this step
147+if you obtained the source from a release tarball.)
148+
149+To run the tests:
149150
150− cabal-dev install -ftests
151+ cabal test
151152
152−And finally run them !
153+If you add a new feature to pandoc, please add tests as well, following
154+the pattern of the existing tests. The test suite code is in
155+`src/test-pandoc.hs`. If you are adding a new reader or writer, it is
156+probably easiest to add some data files to the `tests` directory, and
157+modify `src/Tests/Old.hs`. Otherwise, it is better to modify the module
158+under the `src/Tests` hierarchy corresponding to the pandoc module you
159+are changing.
153160
154− cabal-dev test