Initilize test for stack project
This commit is contained in:
2
test/data/stack-project/Setup.hs
Normal file
2
test/data/stack-project/Setup.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
6
test/data/stack-project/app/Main.hs
Normal file
6
test/data/stack-project/app/Main.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
module Main where
|
||||
|
||||
import Lib
|
||||
|
||||
main :: IO ()
|
||||
main = someFunc
|
||||
41
test/data/stack-project/new-template.cabal
Normal file
41
test/data/stack-project/new-template.cabal
Normal file
@@ -0,0 +1,41 @@
|
||||
name: new-template
|
||||
version: 0.1.0.0
|
||||
synopsis: Initial project template from stack
|
||||
description: Please see README.md
|
||||
homepage: http://github.com/name/project
|
||||
-- license: BSD3
|
||||
-- license-file: LICENSE
|
||||
author: Your name here
|
||||
maintainer: your.address@example.com
|
||||
-- copyright:
|
||||
category: Web
|
||||
build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
library
|
||||
hs-source-dirs: src
|
||||
exposed-modules: Lib
|
||||
build-depends: base >= 4.7 && < 5
|
||||
default-language: Haskell2010
|
||||
|
||||
executable new-template-exe
|
||||
hs-source-dirs: app
|
||||
main-is: Main.hs
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
build-depends: base
|
||||
, new-template
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite new-template-test
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: test
|
||||
main-is: Spec.hs
|
||||
build-depends: base
|
||||
, new-template
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
default-language: Haskell2010
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/name/project
|
||||
6
test/data/stack-project/src/Lib.hs
Normal file
6
test/data/stack-project/src/Lib.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
module Lib
|
||||
( someFunc
|
||||
) where
|
||||
|
||||
someFunc :: IO ()
|
||||
someFunc = putStrLn "someFunc"
|
||||
2
test/data/stack-project/test/Spec.hs
Normal file
2
test/data/stack-project/test/Spec.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
main :: IO ()
|
||||
main = putStrLn "Test suite not yet implemented"
|
||||
Reference in New Issue
Block a user