summaryrefslogtreecommitdiff
path: root/src/exe/Test.lhs
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-08-24 17:09:34 +0200
committerLars-Dominik Braun <lars@6xq.net>2020-08-24 17:09:34 +0200
commit295dd897297722d07ec2ce5fb82e323fe495c775 (patch)
tree8d9de652a030c34c6be775ca31c159620f52fbf1 /src/exe/Test.lhs
parent39f9263fa38c32ce2e3a4f4bedb8349da47a3200 (diff)
downloadpesto-295dd897297722d07ec2ce5fb82e323fe495c775.tar.gz
pesto-295dd897297722d07ec2ce5fb82e323fe495c775.tar.bz2
pesto-295dd897297722d07ec2ce5fb82e323fe495c775.zip
GHC 8.8, cabal 3, pandoc 2.10 compatibility
Move files around to separate Pesto (the library) and Pesto (the executables). Fixes for pandoc API changes.
Diffstat (limited to 'src/exe/Test.lhs')
-rw-r--r--src/exe/Test.lhs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/exe/Test.lhs b/src/exe/Test.lhs
new file mode 100644
index 0000000..400192e
--- /dev/null
+++ b/src/exe/Test.lhs
@@ -0,0 +1,22 @@
+Running tests
++++++++++++++
+
+.. class:: nodoc
+
+> import Test.HUnit
+> import System.Exit (exitFailure, exitSuccess)
+> import Codec.Pesto.Parse (test)
+> import Codec.Pesto.Lint (test)
+> import Codec.Pesto.Graph (test)
+
+The testcases can be run with ``cabal test``. This runs *all* testcases from
+all modules and prints a summary.
+
+> main = runTestTT tests >>= \c -> if errors c + failures c > 0 then exitFailure else exitSuccess
+
+> tests = TestList [
+> "parse" ~: Codec.Pesto.Parse.test
+> , "graph" ~: Codec.Pesto.Graph.test
+> , "lint" ~: Codec.Pesto.Lint.test
+> ]
+