mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 15:14:49 +03:00
lib: Added a new much more thorough test to MultiBalanceReports.
This test makes sure that -H works correctly and it does not show empty accounts.
This commit is contained in:
parent
9873bcfcba
commit
f0914ff08e
@ -241,6 +241,20 @@ tests_multiBalanceReport =
|
|||||||
,("income:salary","salary",2, [mamountp' "$-1.00"], mamountp' "$-1.00",Mixed [amount0 {aquantity=(-1)}])
|
,("income:salary","salary",2, [mamountp' "$-1.00"], mamountp' "$-1.00",Mixed [amount0 {aquantity=(-1)}])
|
||||||
],
|
],
|
||||||
Mixed [usd0])
|
Mixed [usd0])
|
||||||
|
|
||||||
|
,"multiBalanceReport tests the ability to have a valid history on an empty period (More complex)" ~: do
|
||||||
|
(defreportopts{period_= PeriodBetween (fromGregorian 2009 1 1) (fromGregorian 2009 1 2), balancetype_=HistoricalBalance}, samplejournal) `gives`
|
||||||
|
(
|
||||||
|
[
|
||||||
|
("assets:bank:checking","checking",3, [mamountp' "$1.00"], mamountp' "$1.00",Mixed [amount0 {aquantity=1}])
|
||||||
|
,("assets:bank:saving","saving",3, [mamountp' "$1.00"], mamountp' "$1.00",Mixed [amount0 {aquantity=1}])
|
||||||
|
,("assets:cash","cash",2, [mamountp' "$-2.00"], mamountp' "$-2.00",Mixed [amount0 {aquantity=(-2)}])
|
||||||
|
,("expenses:food","food",2, [mamountp' "$1.00"], mamountp' "$1.00",Mixed [amount0 {aquantity=(1)}])
|
||||||
|
,("expenses:supplies","supplies",2, [mamountp' "$1.00"], mamountp' "$1.00",Mixed [amount0 {aquantity=(1)}])
|
||||||
|
,("income:gifts","gifts",2, [mamountp' "$-1.00"], mamountp' "$-1.00",Mixed [amount0 {aquantity=(-1)}])
|
||||||
|
,("income:salary","salary",2, [mamountp' "$-1.00"], mamountp' "$-1.00",Mixed [amount0 {aquantity=(-1)}])
|
||||||
|
],
|
||||||
|
Mixed [usd0])
|
||||||
]
|
]
|
||||||
|
|
||||||
tests_Hledger_Reports_MultiBalanceReport :: Test
|
tests_Hledger_Reports_MultiBalanceReport :: Test
|
||||||
|
Loading…
Reference in New Issue
Block a user