;test: consistent singular naming for test suites and files
This commit is contained in:
parent
c7574b8005
commit
caf8cdf0ca
@ -4,7 +4,7 @@ cabal-version: 1.12
|
|||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
--
|
||||||
-- hash: cf0e219278c663cf046db556525050092c383724e703e70b43ed174a0cc146b9
|
-- hash: 50ae1fdf62051f33ffe1ef49edc8913a28b524ebdba88d72ef257cc0b25a95c2
|
||||||
|
|
||||||
name: hledger-lib
|
name: hledger-lib
|
||||||
version: 1.15.99
|
version: 1.15.99
|
||||||
@ -30,6 +30,8 @@ build-type: Simple
|
|||||||
extra-source-files:
|
extra-source-files:
|
||||||
CHANGES.md
|
CHANGES.md
|
||||||
README
|
README
|
||||||
|
test/unittest.hs
|
||||||
|
test/doctests.hs
|
||||||
hledger_csv.5
|
hledger_csv.5
|
||||||
hledger_csv.txt
|
hledger_csv.txt
|
||||||
hledger_csv.info
|
hledger_csv.info
|
||||||
@ -146,7 +148,7 @@ library
|
|||||||
, utf8-string >=0.3.5
|
, utf8-string >=0.3.5
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite doctests
|
test-suite doctest
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: doctests.hs
|
main-is: doctests.hs
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
@ -201,9 +203,9 @@ test-suite doctests
|
|||||||
buildable: False
|
buildable: False
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite unittests
|
test-suite unittest
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: unittests.hs
|
main-is: unittest.hs
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
./.
|
./.
|
||||||
test
|
test
|
||||||
|
|||||||
@ -23,6 +23,8 @@ tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.5, GHC==8.8.1
|
|||||||
extra-source-files:
|
extra-source-files:
|
||||||
- CHANGES.md
|
- CHANGES.md
|
||||||
- README
|
- README
|
||||||
|
- test/unittest.hs
|
||||||
|
- test/doctests.hs
|
||||||
- hledger_csv.5
|
- hledger_csv.5
|
||||||
- hledger_csv.txt
|
- hledger_csv.txt
|
||||||
- hledger_csv.info
|
- hledger_csv.info
|
||||||
@ -150,20 +152,23 @@ library:
|
|||||||
# other-modules:
|
# other-modules:
|
||||||
# - Ledger.Parser.Text
|
# - Ledger.Parser.Text
|
||||||
|
|
||||||
|
# "cabal test hledger-lib" currently fails, see doctest suite below
|
||||||
tests:
|
tests:
|
||||||
|
|
||||||
unittests:
|
unittest:
|
||||||
buildable: true
|
buildable: true
|
||||||
source-dirs: test
|
source-dirs: test
|
||||||
main: unittests.hs
|
main: unittest.hs
|
||||||
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
||||||
dependencies:
|
dependencies:
|
||||||
- hledger-lib
|
- hledger-lib
|
||||||
|
|
||||||
doctests:
|
# Running this test suite with cabal requires cabal exec:
|
||||||
|
# cabal exec -- cabal test hledger-lib:test:doctest
|
||||||
|
doctest:
|
||||||
buildable: true
|
buildable: true
|
||||||
source-dirs: test
|
source-dirs: test
|
||||||
main: doctests.hs
|
main: doctests.hs # can't call it doctest.hs ("File name does not match module name")
|
||||||
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
||||||
dependencies:
|
dependencies:
|
||||||
- Glob >=0.7
|
- Glob >=0.7
|
||||||
|
|||||||
@ -15,6 +15,8 @@ or:
|
|||||||
$ stack test hledger-lib:test:doctests [--test-arguments '[--verbose] [--slow] [CIFILEPATHSUBSTRINGS]']
|
$ stack test hledger-lib:test:doctests [--test-arguments '[--verbose] [--slow] [CIFILEPATHSUBSTRINGS]']
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
-- This file can't be called doctest.hs ("File name does not match module name")
|
||||||
|
|
||||||
|
|
||||||
{-# LANGUAGE PackageImports #-}
|
{-# LANGUAGE PackageImports #-}
|
||||||
|
|
||||||
|
|||||||
@ -156,8 +156,9 @@ executables:
|
|||||||
# 2018/06 not building and not testing anything useful, disabled for now
|
# 2018/06 not building and not testing anything useful, disabled for now
|
||||||
# tests:
|
# tests:
|
||||||
# test:
|
# test:
|
||||||
# source-dirs: tests
|
# source-dirs: test
|
||||||
# main: main.hs
|
# main: test.hs
|
||||||
|
# other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
||||||
# cpp-options: -DVERSION="1.15.99"
|
# cpp-options: -DVERSION="1.15.99"
|
||||||
# dependencies:
|
# dependencies:
|
||||||
# - base
|
# - base
|
||||||
|
|||||||
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
-- cabal missing-home-modules workaround from hledger-lib needed here ?
|
||||||
|
-- {-# LANGUAGE PackageImports #-}
|
||||||
|
|
||||||
import Import
|
import Import
|
||||||
import Yesod.Default.Config
|
import Yesod.Default.Config
|
||||||
import Yesod.Test
|
import Yesod.Test
|
||||||
@ -4,7 +4,7 @@ cabal-version: 1.12
|
|||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
--
|
||||||
-- hash: c34a49b389c7aa9792791b41a60416463ac2aff3589693aaf40f68e8b7b9cf75
|
-- hash: dce1e3c4551b6781f95215575bb9b99ffa903ccf39375c8df7bbe8ec32f49d12
|
||||||
|
|
||||||
name: hledger
|
name: hledger
|
||||||
version: 1.15.99
|
version: 1.15.99
|
||||||
@ -32,7 +32,7 @@ build-type: Simple
|
|||||||
extra-source-files:
|
extra-source-files:
|
||||||
CHANGES.md
|
CHANGES.md
|
||||||
README.md
|
README.md
|
||||||
test/test.hs
|
test/unittest.hs
|
||||||
bench/10000x1000x10.journal
|
bench/10000x1000x10.journal
|
||||||
hledger.1
|
hledger.1
|
||||||
hledger.txt
|
hledger.txt
|
||||||
@ -243,9 +243,9 @@ executable hledger
|
|||||||
ghc-options: -threaded
|
ghc-options: -threaded
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite test
|
test-suite unittest
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: test.hs
|
main-is: unittest.hs
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
test
|
test
|
||||||
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
|
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
|
||||||
|
|||||||
@ -25,7 +25,7 @@ tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.5, GHC==8.8.1
|
|||||||
extra-source-files:
|
extra-source-files:
|
||||||
- CHANGES.md
|
- CHANGES.md
|
||||||
- README.md
|
- README.md
|
||||||
- test/test.hs
|
- test/unittest.hs
|
||||||
- bench/10000x1000x10.journal
|
- bench/10000x1000x10.journal
|
||||||
- hledger.1
|
- hledger.1
|
||||||
- hledger.txt
|
- hledger.txt
|
||||||
@ -204,9 +204,9 @@ executables:
|
|||||||
- hledger
|
- hledger
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
test:
|
unittest:
|
||||||
source-dirs: test
|
source-dirs: test
|
||||||
main: test.hs
|
main: unittest.hs
|
||||||
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
||||||
cpp-options: -DVERSION="1.15.99"
|
cpp-options: -DVERSION="1.15.99"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user