From 1a6457a84fb3430dbbe0270ce60e8c325906ce74 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 29 Jun 2015 21:31:10 +0200 Subject: Use cabal’s testsuite interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Test.lhs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Test.lhs b/src/Test.lhs index 852c700..68f1831 100644 --- a/src/Test.lhs +++ b/src/Test.lhs @@ -4,6 +4,7 @@ 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) @@ -11,7 +12,7 @@ Running tests The testcases can be run with ``cabal run pesto-test``. This runs *all* testcases from all modules and prints a summary. -> main = runTestTT tests +> main = runTestTT tests >>= \c -> if errors c + failures c > 0 then exitFailure else exitSuccess > tests = TestList [ > "parse" ~: Codec.Pesto.Parse.test -- cgit v1.2.3