Skip to content

Commit 7d16566

Browse files
Add test for #3997
1 parent b5d3090 commit 7d16566

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Control.Monad (unless)
2+
import Data.List (isInfixOf)
3+
import StackTest
4+
5+
main :: IO ()
6+
main = do
7+
stack ["setup"]
8+
stackCheckStderr ["test", "--coverage"] $ \out -> do
9+
unless ("The coverage report for foo's test-suite \"foo-test\" is available at" `isInfixOf` out) $
10+
fail "Coverage report didn't build"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: foo
2+
3+
dependencies:
4+
- base
5+
6+
library:
7+
source-dirs: src
8+
9+
tests:
10+
foo-test:
11+
source-dirs: test
12+
main: Main.hs
13+
dependencies:
14+
- foo
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Lib (foo) where
2+
3+
foo :: Int
4+
foo = 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resolver: lts-15.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Lib
2+
3+
main :: IO ()
4+
main = print foo

0 commit comments

Comments
 (0)