tags:

views:

256

answers:

1

I have a Haskell project and Cabal package-description that allows me to build and install my package with

$ cabal configure
$ cabal build
$ cabal install

But what about cabal test? Cabal's help says to configure a test suite with UserHooks, but how can I do that?

+2  A: 

For one approach, see Setting up a simple test with Cabal.

This approach has drawbacks, and there's an open Cabal ticket that suggests being able to specify tests more directly, e.g.,

test
  test-is: Test
  build-depends: QuickCheck
  hs-source-dirs: tests src
Greg Bacon
This feature will be in Cabal-1.10
Duncan Coutts
@Duncan Great news and great that you're contributing here!
Greg Bacon