summaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-07-26 10:01:23 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-07-26 10:01:23 -0700
commit50f2641f631859c601094fd1c957aefe4628b89a (patch)
tree8f0d698dba2a689a227ca0d8b1eb41ee86b2a731 /INSTALL
parentc936b25ebf92b0bb423cc43e4d33e33555e09fbb (diff)
Updated INSTALL for new test/benchmarks.
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL34
1 files changed, 29 insertions, 5 deletions
diff --git a/INSTALL b/INSTALL
index 8c4a07e2b..a3d2389e5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -136,9 +136,9 @@ Running tests
-------------
Pandoc comes with an automated test suite integrated to cabal.
-To enable the tests, compile pandoc with the `tests` flag:
+To build the tests:
- cabal install -ftests
+ cabal configure --enable-tests && cabal build
Note: If you obtained the source via git, you should first do
@@ -151,11 +151,35 @@ To run the tests:
cabal test
+To run particular tests (pattern-matching on their names), use
+the `-t` option:
+
+ cabal test --test-options='-t markdown'
+
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
+`tests/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
+modify `tests/Tests/Old.hs`. Otherwise, it is better to modify the module
+under the `tests/Tests` hierarchy corresponding to the pandoc module you
are changing.
+Running benchmarks
+------------------
+
+To build the benchmarks:
+
+ cabal configure --enable-benchmarks && cabal build
+
+To run the benchmarks:
+
+ cabal bench
+
+To use a smaller sample size so the benchmarks run faster:
+
+ cabal bench --benchmark-options='-s 20'
+
+To run just the markdown benchmarks:
+
+ cabal bench --benchmark-options='markdown'
+