Current state of integrating unit tests with Haskell's Cabal?

后端 未结 1 1673
终归单人心
终归单人心 2021-01-31 10:38

When i google for how to integrate unit tests with cabal files, i either find

  • http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program which does not seem
1条回答
  •  执笔经年
    2021-01-31 11:05

    1. Make sure you have the latest version of Cabal and cabal-install installed.

    2. Have a test-suite section in your .cabal file. See this section of cabal's documentation for an explanation of how to write a test-suite section in your Cabal file and this section for instructions on how to run it.

    I've been using the built-in test support for some time and it has saved me from having to maintain fragile Makefiles just for my tests. There are still some rough edges in the command line output of cabal test, but they have been fixed in HEAD so in the next Cabal/cabal-install release everything should be very smooth.

    0 讨论(0)
提交回复
热议问题