mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 15:14:49 +03:00
change balance report tests to ledger 3 behaviour - -s by default, -n has no effect
This commit is contained in:
parent
481b8db0b0
commit
c4c94baeab
52
Tests.hs
52
Tests.hs
@ -118,15 +118,6 @@ tests = [
|
|||||||
"balance report with no args" ~:
|
"balance report with no args" ~:
|
||||||
([], []) `gives`
|
([], []) `gives`
|
||||||
[" $-1 assets"
|
[" $-1 assets"
|
||||||
," $2 expenses"
|
|
||||||
," $-2 income"
|
|
||||||
," $1 liabilities"
|
|
||||||
]
|
|
||||||
,
|
|
||||||
|
|
||||||
"balance report with -s" ~:
|
|
||||||
([SubTotal], []) `gives`
|
|
||||||
[" $-1 assets"
|
|
||||||
," $1 bank:saving"
|
," $1 bank:saving"
|
||||||
," $-2 cash"
|
," $-2 cash"
|
||||||
," $2 expenses"
|
," $2 expenses"
|
||||||
@ -139,8 +130,8 @@ tests = [
|
|||||||
]
|
]
|
||||||
,
|
,
|
||||||
|
|
||||||
"balance report --depth limits -s" ~:
|
"balance report level can also be limited with --depth" ~:
|
||||||
([SubTotal,Depth "1"], []) `gives`
|
([Depth "1"], []) `gives`
|
||||||
[" $-1 assets"
|
[" $-1 assets"
|
||||||
," $2 expenses"
|
," $2 expenses"
|
||||||
," $-2 income"
|
," $-2 income"
|
||||||
@ -148,31 +139,7 @@ tests = [
|
|||||||
]
|
]
|
||||||
,
|
,
|
||||||
|
|
||||||
"balance report --depth activates -s" ~:
|
|
||||||
([Depth "2"], []) `gives`
|
|
||||||
[" $-1 assets"
|
|
||||||
," $1 bank"
|
|
||||||
," $-2 cash"
|
|
||||||
," $2 expenses"
|
|
||||||
," $1 food"
|
|
||||||
," $1 supplies"
|
|
||||||
," $-2 income"
|
|
||||||
," $-1 gifts"
|
|
||||||
," $-1 salary"
|
|
||||||
," $1 liabilities:debts"
|
|
||||||
]
|
|
||||||
,
|
|
||||||
|
|
||||||
"balance report with account pattern o" ~:
|
"balance report with account pattern o" ~:
|
||||||
([], ["o"]) `gives`
|
|
||||||
[" $1 expenses:food"
|
|
||||||
," $-2 income"
|
|
||||||
,"--------------------"
|
|
||||||
," $-1"
|
|
||||||
]
|
|
||||||
,
|
|
||||||
|
|
||||||
"balance report with account pattern o and -s" ~:
|
|
||||||
([SubTotal], ["o"]) `gives`
|
([SubTotal], ["o"]) `gives`
|
||||||
[" $1 expenses:food"
|
[" $1 expenses:food"
|
||||||
," $-2 income"
|
," $-2 income"
|
||||||
@ -183,6 +150,15 @@ tests = [
|
|||||||
]
|
]
|
||||||
,
|
,
|
||||||
|
|
||||||
|
"balance report with account pattern o and --depth 1" ~:
|
||||||
|
([Depth "1"], ["o"]) `gives`
|
||||||
|
[" $1 expenses:food"
|
||||||
|
," $-2 income"
|
||||||
|
,"--------------------"
|
||||||
|
," $-1"
|
||||||
|
]
|
||||||
|
,
|
||||||
|
|
||||||
"balance report with account pattern a" ~:
|
"balance report with account pattern a" ~:
|
||||||
([], ["a"]) `gives`
|
([], ["a"]) `gives`
|
||||||
[" $-1 assets"
|
[" $-1 assets"
|
||||||
@ -256,12 +232,6 @@ tests = [
|
|||||||
]
|
]
|
||||||
,
|
,
|
||||||
|
|
||||||
"balance report with -n omits the total" ~:
|
|
||||||
([Collapse], ["cash"]) `gives`
|
|
||||||
[" $-2 assets:cash"
|
|
||||||
]
|
|
||||||
,
|
|
||||||
|
|
||||||
"balance report with cost basis" ~: do
|
"balance report with cost basis" ~: do
|
||||||
rl <- rawledgerfromstring $ unlines
|
rl <- rawledgerfromstring $ unlines
|
||||||
[""
|
[""
|
||||||
|
Loading…
Reference in New Issue
Block a user