testing - How can I set up a simple test with Cabal? -


I have a Haskell project and a cabal package-description that allows me to create and install my package

$ cabal build $ cabal install

but what about cabal test ? With the help of Kabal, the user is asked to configure a test suite with the hook, but how can I do this?

In response to Greg, Kagal-10 .10 gets support for test suits outside the box .

It seems that I have got the best information about how to use it.

There is a snippet from manual that shows how to use the exitcode-stdio test type:

foo.cabal

  Name: foo Version: 1.0 License: BSD3 cable-edition: & gt; = 1.9.2 Build-Type: Simple Test-Suite Test-EF Type: exitcode-stdio-1.0 is main: test-foo.hs build -depend: base  

test -foo.hs:

  Module main where importing systems ExitFailure main = Do "STRLN" This test always fails! "ExitFailure  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -