;lib: re-enable doctests
This commit is contained in:
		
							parent
							
								
									6dbe925eed
								
							
						
					
					
						commit
						097486a247
					
				| @ -242,14 +242,9 @@ validateCsv rules numhdrlines (Right rs) = validate $ applyConditionalSkips $ dr | |||||||
|     validate rs@(_first:_) |     validate rs@(_first:_) | ||||||
|       | isJust lessthan2 = let r = fromJust lessthan2 in |       | isJust lessthan2 = let r = fromJust lessthan2 in | ||||||
|           Left $ printf "CSV record %s has less than two fields" (show r) |           Left $ printf "CSV record %s has less than two fields" (show r) | ||||||
|       -- | isJust different = let r = fromJust different in |  | ||||||
|       --     Left $ printf "the first CSV record %s has %d fields but %s has %d" |  | ||||||
|       --       (show first) length1 (show r) (length r) |  | ||||||
|       | otherwise        = Right rs |       | otherwise        = Right rs | ||||||
|       where |       where | ||||||
|         lessthan2 = headMay $ filter ((<2).length) rs |         lessthan2 = headMay $ filter ((<2).length) rs | ||||||
|         -- length1   = length first |  | ||||||
|         -- different = headMay $ filter ((/=length1).length) rs |  | ||||||
| 
 | 
 | ||||||
| -- -- | The highest (0-based) field index referenced in the field | -- -- | The highest (0-based) field index referenced in the field | ||||||
| -- -- definitions, or -1 if no fields are defined. | -- -- definitions, or -1 if no fields are defined. | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ cabal-version: 1.12 | |||||||
| -- | -- | ||||||
| -- see: https://github.com/sol/hpack | -- see: https://github.com/sol/hpack | ||||||
| -- | -- | ||||||
| -- hash: 76c7a62a518ff4226e139c42540aaf8f3331fb1a7250cc7a784f9cf9a2e4b123 | -- hash: d8bff513572239ec58023f9d69f207434d3ce06db8866c7d6469bbdb26daa47d | ||||||
| 
 | 
 | ||||||
| name:           hledger-lib | name:           hledger-lib | ||||||
| version:        1.15.99 | version:        1.15.99 | ||||||
| @ -151,56 +151,6 @@ library | |||||||
| test-suite doctests | test-suite doctests | ||||||
|   type: exitcode-stdio-1.0 |   type: exitcode-stdio-1.0 | ||||||
|   main-is: doctests.hs |   main-is: doctests.hs | ||||||
|   other-modules: |  | ||||||
|       Hledger |  | ||||||
|       Hledger.Data |  | ||||||
|       Hledger.Data.Account |  | ||||||
|       Hledger.Data.AccountName |  | ||||||
|       Hledger.Data.Amount |  | ||||||
|       Hledger.Data.Commodity |  | ||||||
|       Hledger.Data.Dates |  | ||||||
|       Hledger.Data.Journal |  | ||||||
|       Hledger.Data.Ledger |  | ||||||
|       Hledger.Data.Period |  | ||||||
|       Hledger.Data.PeriodicTransaction |  | ||||||
|       Hledger.Data.Posting |  | ||||||
|       Hledger.Data.RawOptions |  | ||||||
|       Hledger.Data.StringFormat |  | ||||||
|       Hledger.Data.Timeclock |  | ||||||
|       Hledger.Data.Transaction |  | ||||||
|       Hledger.Data.TransactionModifier |  | ||||||
|       Hledger.Data.Types |  | ||||||
|       Hledger.Data.Valuation |  | ||||||
|       Hledger.Query |  | ||||||
|       Hledger.Read |  | ||||||
|       Hledger.Read.Common |  | ||||||
|       Hledger.Read.CsvReader |  | ||||||
|       Hledger.Read.JournalReader |  | ||||||
|       Hledger.Read.TimeclockReader |  | ||||||
|       Hledger.Read.TimedotReader |  | ||||||
|       Hledger.Reports |  | ||||||
|       Hledger.Reports.AccountTransactionsReport |  | ||||||
|       Hledger.Reports.BalanceReport |  | ||||||
|       Hledger.Reports.BudgetReport |  | ||||||
|       Hledger.Reports.EntriesReport |  | ||||||
|       Hledger.Reports.MultiBalanceReport |  | ||||||
|       Hledger.Reports.PostingsReport |  | ||||||
|       Hledger.Reports.ReportOptions |  | ||||||
|       Hledger.Reports.ReportTypes |  | ||||||
|       Hledger.Reports.TransactionsReport |  | ||||||
|       Hledger.Utils |  | ||||||
|       Hledger.Utils.Color |  | ||||||
|       Hledger.Utils.Debug |  | ||||||
|       Hledger.Utils.Parse |  | ||||||
|       Hledger.Utils.Regex |  | ||||||
|       Hledger.Utils.String |  | ||||||
|       Hledger.Utils.Test |  | ||||||
|       Hledger.Utils.Text |  | ||||||
|       Hledger.Utils.Tree |  | ||||||
|       Hledger.Utils.UTF8IOCompat |  | ||||||
|       Text.Megaparsec.Custom |  | ||||||
|       Text.Tabular.AsciiWide |  | ||||||
|       Paths_hledger_lib |  | ||||||
|   hs-source-dirs: |   hs-source-dirs: | ||||||
|       ./. |       ./. | ||||||
|       test |       test | ||||||
| @ -247,7 +197,7 @@ test-suite doctests | |||||||
|     , transformers >=0.2 |     , transformers >=0.2 | ||||||
|     , uglymemo |     , uglymemo | ||||||
|     , utf8-string >=0.3.5 |     , utf8-string >=0.3.5 | ||||||
|   buildable: False |   buildable: True | ||||||
|   if (!impl(ghc >= 8.0)) |   if (!impl(ghc >= 8.0)) | ||||||
|     build-depends: |     build-depends: | ||||||
|         semigroups ==0.18.* |         semigroups ==0.18.* | ||||||
|  | |||||||
| @ -156,13 +156,14 @@ library: | |||||||
| 
 | 
 | ||||||
| tests: | tests: | ||||||
| 
 | 
 | ||||||
|   # 201909: disabled these by default. They (each ?) require a slow rebuild  |   # 201909: disabled easytests by default. It require a slow rebuild | ||||||
|   # of hledger-lib and are not worth the time, energy and carbon. |   # of hledger-lib and are not worth the time, energy and carbon. | ||||||
| 
 | 
 | ||||||
|   doctests: |   doctests: | ||||||
|     buildable: false |     buildable: true | ||||||
|     source-dirs: test |     source-dirs: test | ||||||
|     main: doctests.hs |     main: doctests.hs | ||||||
|  |     other-modules: []  # https://github.com/sol/hpack/issues/188 | ||||||
|     dependencies: |     dependencies: | ||||||
|     - Glob >=0.7 |     - Glob >=0.7 | ||||||
|     # Need a doctest new enough to support --fast and --verbose. |     # Need a doctest new enough to support --fast and --verbose. | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user