aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-09 16:51:08 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-09 16:51:08 +0000
commit5d3d2d79b3e217e3b420e3d56c5e844e5cae5cf1 (patch)
tree2cb5278f22b77842d177a6c8cd374bd515a7c0a4 /Setup.hs
parentf1914c21b7dd62cc65e9c4ac20d70986bddd8775 (diff)
downloadpandoc-5d3d2d79b3e217e3b420e3d56c5e844e5cae5cf1.tar.gz
Rewrote test suite so it doesn't depend on perl or unix tools.
+ Replaced old runtests.pl with a Haskell script RunTests.hs. + Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'. + Added test hook to Setup.hs, so tests may be run from cabal. + Changed Makefile's 'test' target to run tests via cabal. + Removed old generate.sh. + Since we no longer have 'sed' to filter out raw HTML sections from the docbook writer test, or raw LaTeX sections from the context writer test, we now just include these sections. They can be taken out if it is necessary to process the files. + Updated latex and context writer tests to remove extra spaces after '\\item' + Added a markdown table reader test. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1385 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
index 200a2e51d..bdef399a8 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,3 +1,13 @@
import Distribution.Simple
-main = defaultMain
+import System.Process ( runCommand, waitForProcess )
+import System.Directory ( setCurrentDirectory )
+
+main = defaultMainWithHooks (simpleUserHooks {runTests = runTestSuite})
+
+testDir = "tests"
+
+runTestSuite _ _ _ _ = do
+ setCurrentDirectory testDir
+ runCommand "runhaskell RunTests.hs" >>= waitForProcess
+ return ()