This commit is contained in:
Yann Esposito (Yogsototh) 2016-05-23 01:09:33 +02:00
parent 55ce114fd4
commit 1c0f8ff8d0
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
5 changed files with 16 additions and 12 deletions

View file

@ -18,8 +18,8 @@ before_install:
- stack setup --resolver=lts-5.15
script:
- stack test :human-readable-duration-test --no-terminal --skip-ghc-check --coverage
- stack test :doctest --no-terminal --coverage --ghc-options '-fforce-recomp'
after_script:
- travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.2.0/shc-linux-x64-$GHCVER.tar.bz2 | tar -xj
- ./shc human-readable-duration human-readable-duration-test
- ./shc human-readable-duration doctest

View file

@ -30,14 +30,14 @@ library
build-depends: base >= 4.7 && < 5
default-language: Haskell2010
test-suite human-readable-duration-test
test-suite doctest
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
main-is: DocTest.hs
build-depends: base >= 4.7 && < 5
, Glob >= 0.7
, human-readable-duration
, doctest >= 0.9.12
, time >= 1.5.0.0
ghc-options: -O2 -Wall
default-language: Haskell2010

View file

@ -3,3 +3,7 @@ packages:
- '.'
extra-deps: []
resolver: lts-5.15
extra-lib-dirs:
- /usr/lib
- /usr/local/lib
- /usr/local/opt/libiconv/lib

7
test/DocTest.hs Normal file
View file

@ -0,0 +1,7 @@
module Main where
import System.FilePath.Glob (glob)
import Test.DocTest
main :: IO ()
main = glob "src/**/*.hs" >>= doctest

View file

@ -1,7 +0,0 @@
module Main where
import Test.DocTest
main :: IO ()
main = doctest [ "src/Data/Duration.hs"
, "src/Data/Duration/Tutorial.hs"]