;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 | ||||
| -- | ||||
| -- hash: cf0e219278c663cf046db556525050092c383724e703e70b43ed174a0cc146b9 | ||||
| -- hash: 50ae1fdf62051f33ffe1ef49edc8913a28b524ebdba88d72ef257cc0b25a95c2 | ||||
| 
 | ||||
| name:           hledger-lib | ||||
| version:        1.15.99 | ||||
| @ -30,6 +30,8 @@ build-type:     Simple | ||||
| extra-source-files: | ||||
|     CHANGES.md | ||||
|     README | ||||
|     test/unittest.hs | ||||
|     test/doctests.hs | ||||
|     hledger_csv.5 | ||||
|     hledger_csv.txt | ||||
|     hledger_csv.info | ||||
| @ -146,7 +148,7 @@ library | ||||
|     , utf8-string >=0.3.5 | ||||
|   default-language: Haskell2010 | ||||
| 
 | ||||
| test-suite doctests | ||||
| test-suite doctest | ||||
|   type: exitcode-stdio-1.0 | ||||
|   main-is: doctests.hs | ||||
|   hs-source-dirs: | ||||
| @ -201,9 +203,9 @@ test-suite doctests | ||||
|     buildable: False | ||||
|   default-language: Haskell2010 | ||||
| 
 | ||||
| test-suite unittests | ||||
| test-suite unittest | ||||
|   type: exitcode-stdio-1.0 | ||||
|   main-is: unittests.hs | ||||
|   main-is: unittest.hs | ||||
|   hs-source-dirs: | ||||
|       ./. | ||||
|       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: | ||||
| - CHANGES.md | ||||
| - README | ||||
| - test/unittest.hs | ||||
| - test/doctests.hs | ||||
| - hledger_csv.5 | ||||
| - hledger_csv.txt | ||||
| - hledger_csv.info | ||||
| @ -150,20 +152,23 @@ library: | ||||
| #  other-modules: | ||||
| #  - Ledger.Parser.Text | ||||
| 
 | ||||
| # "cabal test hledger-lib" currently fails, see doctest suite below | ||||
| tests: | ||||
| 
 | ||||
|   unittests: | ||||
|   unittest: | ||||
|     buildable: true | ||||
|     source-dirs: test | ||||
|     main: unittests.hs | ||||
|     main: unittest.hs | ||||
|     other-modules: []  # prevent double compilation, https://github.com/sol/hpack/issues/188 | ||||
|     dependencies: | ||||
|     - hledger-lib | ||||
| 
 | ||||
|   doctests: | ||||
|   # Running this test suite with cabal requires cabal exec: | ||||
|   # cabal exec -- cabal test hledger-lib:test:doctest | ||||
|   doctest: | ||||
|     buildable: true | ||||
|     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 | ||||
|     dependencies: | ||||
|     - Glob >=0.7 | ||||
|  | ||||
| @ -15,6 +15,8 @@ or: | ||||
| $ 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 #-} | ||||
| 
 | ||||
|  | ||||
| @ -156,8 +156,9 @@ executables: | ||||
| # 2018/06 not building and not testing anything useful, disabled for now | ||||
| # tests: | ||||
| #   test: | ||||
| #     source-dirs: tests | ||||
| #     main: main.hs | ||||
| #     source-dirs: test | ||||
| #     main: test.hs | ||||
| #     other-modules: []  # prevent double compilation, https://github.com/sol/hpack/issues/188 | ||||
| #     cpp-options: -DVERSION="1.15.99" | ||||
| #     dependencies: | ||||
| #     - base | ||||
|  | ||||
| @ -4,6 +4,9 @@ | ||||
| 
 | ||||
| module Main where | ||||
| 
 | ||||
| -- cabal missing-home-modules workaround from hledger-lib needed here ? | ||||
| -- {-# LANGUAGE PackageImports #-} | ||||
| 
 | ||||
| import Import | ||||
| import Yesod.Default.Config | ||||
| import Yesod.Test | ||||
| @ -4,7 +4,7 @@ cabal-version: 1.12 | ||||
| -- | ||||
| -- see: https://github.com/sol/hpack | ||||
| -- | ||||
| -- hash: c34a49b389c7aa9792791b41a60416463ac2aff3589693aaf40f68e8b7b9cf75 | ||||
| -- hash: dce1e3c4551b6781f95215575bb9b99ffa903ccf39375c8df7bbe8ec32f49d12 | ||||
| 
 | ||||
| name:           hledger | ||||
| version:        1.15.99 | ||||
| @ -32,7 +32,7 @@ build-type:     Simple | ||||
| extra-source-files: | ||||
|     CHANGES.md | ||||
|     README.md | ||||
|     test/test.hs | ||||
|     test/unittest.hs | ||||
|     bench/10000x1000x10.journal | ||||
|     hledger.1 | ||||
|     hledger.txt | ||||
| @ -243,9 +243,9 @@ executable hledger | ||||
|     ghc-options: -threaded | ||||
|   default-language: Haskell2010 | ||||
| 
 | ||||
| test-suite test | ||||
| test-suite unittest | ||||
|   type: exitcode-stdio-1.0 | ||||
|   main-is: test.hs | ||||
|   main-is: unittest.hs | ||||
|   hs-source-dirs: | ||||
|       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 | ||||
|  | ||||
| @ -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: | ||||
| - CHANGES.md | ||||
| - README.md | ||||
| - test/test.hs | ||||
| - test/unittest.hs | ||||
| - bench/10000x1000x10.journal | ||||
| - hledger.1 | ||||
| - hledger.txt | ||||
| @ -204,9 +204,9 @@ executables: | ||||
|     - hledger | ||||
| 
 | ||||
| tests: | ||||
|   test: | ||||
|   unittest: | ||||
|     source-dirs: test | ||||
|     main: test.hs | ||||
|     main: unittest.hs | ||||
|     other-modules: []  # prevent double compilation, https://github.com/sol/hpack/issues/188 | ||||
|     cpp-options: -DVERSION="1.15.99" | ||||
|     dependencies: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user