lib: use unspaced scopes to simplify command lines (#812)
This commit is contained in:
parent
c79cb568f0
commit
09d8e302db
@ -1247,8 +1247,8 @@ tests_Hledger_Read_Common = TestList [
|
|||||||
easytests = scope "Common" $ tests [
|
easytests = scope "Common" $ tests [
|
||||||
scope "amountp" $ tests [
|
scope "amountp" $ tests [
|
||||||
scope "basic" $ expectParseEq amountp "$47.18" (usd 47.18)
|
scope "basic" $ expectParseEq amountp "$47.18" (usd 47.18)
|
||||||
,scope "ends with decimal mark" $ expectParseEq amountp "$1." (usd 1 `withPrecision` 0)
|
,scope "ends-with-decimal-mark" $ expectParseEq amountp "$1." (usd 1 `withPrecision` 0)
|
||||||
-- ,scope "with unit price" $ expectParseEq amountp "$10 @ €0.5" (usd 10 `withPrecision` 0 `at` (eur 0.5 `withPrecision` 1))
|
-- ,scope "unit-price" $ expectParseEq amountp "$10 @ €0.5" (usd 10 `withPrecision` 0 `at` (eur 0.5 `withPrecision` 1))
|
||||||
-- ,scope "with total price" $ expectParseEq amountp "$10 @@ €5" (usd 10 `withPrecision` 0 @@ (eur 5 `withPrecision` 0))
|
-- ,scope "total-price" $ expectParseEq amountp "$10 @@ €5" (usd 10 `withPrecision` 0 @@ (eur 5 `withPrecision` 0))
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
@ -92,9 +92,9 @@ runEasyTests args easytests = (do
|
|||||||
|
|
||||||
expectParseEq parser input expected = do
|
expectParseEq parser input expected = do
|
||||||
let ep = runIdentity $ parseWithState mempty parser input
|
let ep = runIdentity $ parseWithState mempty parser input
|
||||||
scope "parse succeeded" $ expectRight ep
|
scope "parse-succeeded" $ expectRight ep
|
||||||
let Right p = ep
|
let Right p = ep
|
||||||
scope "parse result" $ expectEq p expected
|
scope "parse-result" $ expectEq p expected
|
||||||
|
|
||||||
-- | Run some hunit tests, returning True if there was a problem.
|
-- | Run some hunit tests, returning True if there was a problem.
|
||||||
-- With arguments, runs only tests whose names contain the first argument
|
-- With arguments, runs only tests whose names contain the first argument
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user