stack new <ProjectName>All to to be reworked for Test.Tasty.
tests:, and <ProjectName>-test:: dependencies:
- <ProjectName>
- <FurtherPackagesToUse>
name: <ProjectNAme>
version: ...
github: ...
license: ...
author: ...
maintainer: ...
copyright: ...
extra-source-files:
- ...
...
description: Please see the README on GitHub at <https://github.com/githubuser/Test1#readme>
dependencies:
- base >= 4.7 && < 5
library:
source-dirs: src
executables:
...
tests:
<ProjectName>-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- <ProjectName>
- <FurterPackagesNeededForTests>
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
...
resolver: ...
# User packages to be built.
...
packages:
- .
...
extra-deps:
- regex-posix-clib-2.7
# Override default flag values for local packages and extra-deps
flags:
regex-posix:
_regex-posix-clib: true
...
# compiler-check: newer-minor
-- to be adapted for using tasty import ... import qualified Lib as Lib main :: IO () main = ... ...
stack test and it will build your tests and run the tests...