cli: make cabal test suite run the test command, not just hunit tests
This commit is contained in:
		
							parent
							
								
									d778a92561
								
							
						
					
					
						commit
						fa6f0e8d1a
					
				| @ -8,6 +8,7 @@ hledger's built-in commands, and helpers for printing the commands list. | ||||
| 
 | ||||
| module Hledger.Cli.Commands ( | ||||
|    findCommand | ||||
|   ,testcmd | ||||
|   ,builtinCommands | ||||
|   ,builtinCommandNames | ||||
|   ,printCommandsList | ||||
|  | ||||
| @ -1,13 +1,8 @@ | ||||
| import Hledger.Cli (tests_Hledger_Cli) | ||||
| import System.Environment (getArgs) | ||||
| import Test.Framework.Providers.HUnit (hUnitTestToTests) | ||||
| import Test.Framework.Runners.Console (defaultMainWithArgs) | ||||
| 
 | ||||
| main :: IO () | ||||
| main = do | ||||
|   args <- getArgs | ||||
|   let args' = "--hide-successes" : args | ||||
|   defaultMainWithArgs (hUnitTestToTests tests_Hledger_Cli) args' | ||||
| 
 | ||||
| {- | ||||
| Run hledger's (and hledger-lib's) unit tests as a cabal test suite, | ||||
| by running the test command with no options. | ||||
| -} | ||||
| 
 | ||||
| import Hledger.Cli | ||||
| 
 | ||||
| main = testcmd defcliopts (error "journal-less command tried to use the journal") | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user