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 ( | module Hledger.Cli.Commands ( | ||||||
|    findCommand |    findCommand | ||||||
|  |   ,testcmd | ||||||
|   ,builtinCommands |   ,builtinCommands | ||||||
|   ,builtinCommandNames |   ,builtinCommandNames | ||||||
|   ,printCommandsList |   ,printCommandsList | ||||||
|  | |||||||
| @ -1,13 +1,8 @@ | |||||||
| import Hledger.Cli (tests_Hledger_Cli) | {- | ||||||
| import System.Environment (getArgs) | Run hledger's (and hledger-lib's) unit tests as a cabal test suite, | ||||||
| import Test.Framework.Providers.HUnit (hUnitTestToTests) | by running the test command with no options. | ||||||
| import Test.Framework.Runners.Console (defaultMainWithArgs) | -} | ||||||
| 
 |  | ||||||
| main :: IO () |  | ||||||
| main = do |  | ||||||
|   args <- getArgs |  | ||||||
|   let args' = "--hide-successes" : args |  | ||||||
|   defaultMainWithArgs (hUnitTestToTests tests_Hledger_Cli) args' |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
|  | import Hledger.Cli | ||||||
| 
 | 
 | ||||||
|  | main = testcmd defcliopts (error "journal-less command tried to use the journal") | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user