make tests pass
This commit is contained in:
parent
83f411f638
commit
e510a64ec8
@ -125,6 +125,8 @@ tests = TestList [
|
|||||||
," $-1 gifts"
|
," $-1 gifts"
|
||||||
," $-1 salary"
|
," $-1 salary"
|
||||||
," $1 liabilities:debts"
|
," $1 liabilities:debts"
|
||||||
|
,"--------------------"
|
||||||
|
," $0"
|
||||||
]
|
]
|
||||||
|
|
||||||
,"balance report can be limited with --depth" ~:
|
,"balance report can be limited with --depth" ~:
|
||||||
@ -133,6 +135,8 @@ tests = TestList [
|
|||||||
," $2 expenses"
|
," $2 expenses"
|
||||||
," $-2 income"
|
," $-2 income"
|
||||||
," $1 liabilities"
|
," $1 liabilities"
|
||||||
|
,"--------------------"
|
||||||
|
," $0"
|
||||||
]
|
]
|
||||||
|
|
||||||
,"balance report with account pattern o" ~:
|
,"balance report with account pattern o" ~:
|
||||||
@ -176,6 +180,8 @@ tests = TestList [
|
|||||||
," $-1 gifts"
|
," $-1 gifts"
|
||||||
," $-1 salary"
|
," $-1 salary"
|
||||||
," $1 liabilities:debts"
|
," $1 liabilities:debts"
|
||||||
|
,"--------------------"
|
||||||
|
," $0"
|
||||||
]
|
]
|
||||||
|
|
||||||
,"balance report with unmatched parent of two matched subaccounts" ~:
|
,"balance report with unmatched parent of two matched subaccounts" ~:
|
||||||
@ -208,7 +214,10 @@ tests = TestList [
|
|||||||
]
|
]
|
||||||
|
|
||||||
,"balance report negative account pattern always matches full name" ~:
|
,"balance report negative account pattern always matches full name" ~:
|
||||||
([], ["not:e"]) `gives` []
|
([], ["not:e"]) `gives`
|
||||||
|
["--------------------"
|
||||||
|
," 0"
|
||||||
|
]
|
||||||
|
|
||||||
,"balance report negative patterns affect totals" ~:
|
,"balance report negative patterns affect totals" ~:
|
||||||
([], ["expenses","not:food"]) `gives`
|
([], ["expenses","not:food"]) `gives`
|
||||||
@ -234,13 +243,14 @@ tests = TestList [
|
|||||||
,"2008/1/1 test "
|
,"2008/1/1 test "
|
||||||
," a:b 10h @ $50"
|
," a:b 10h @ $50"
|
||||||
," c:d "
|
," c:d "
|
||||||
,""
|
|
||||||
]
|
]
|
||||||
let j' = journalCanonicaliseAmounts $ journalConvertAmountsToCost j -- enable cost basis adjustment
|
let j' = journalCanonicaliseAmounts $ journalConvertAmountsToCost j -- enable cost basis adjustment
|
||||||
showBalanceReport [] nullfilterspec j' `is`
|
showBalanceReport [] nullfilterspec j' `is`
|
||||||
unlines
|
unlines
|
||||||
[" $500 a:b"
|
[" $500 a:b"
|
||||||
," $-500 c:d"
|
," $-500 c:d"
|
||||||
|
,"--------------------"
|
||||||
|
," $0"
|
||||||
]
|
]
|
||||||
|
|
||||||
,"balance report elides zero-balance root account(s)" ~: do
|
,"balance report elides zero-balance root account(s)" ~: do
|
||||||
@ -254,6 +264,8 @@ tests = TestList [
|
|||||||
unlines
|
unlines
|
||||||
[" 1 test:a"
|
[" 1 test:a"
|
||||||
," -1 test:b"
|
," -1 test:b"
|
||||||
|
,"--------------------"
|
||||||
|
," 0"
|
||||||
]
|
]
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -576,7 +588,10 @@ tests = TestList [
|
|||||||
"2009/01/01 * медвежья шкура\n расходы:покупки 100\n актив:наличные\n"
|
"2009/01/01 * медвежья шкура\n расходы:покупки 100\n актив:наличные\n"
|
||||||
showBalanceReport [] (optsToFilterSpec [] [] t1) l `is` unlines
|
showBalanceReport [] (optsToFilterSpec [] [] t1) l `is` unlines
|
||||||
[" -100 актив:наличные"
|
[" -100 актив:наличные"
|
||||||
," 100 расходы:покупки"]
|
," 100 расходы:покупки"
|
||||||
|
,"--------------------"
|
||||||
|
," 0"
|
||||||
|
]
|
||||||
|
|
||||||
,"unicode in register layout" ~: do
|
,"unicode in register layout" ~: do
|
||||||
l <- readJournalWithOpts []
|
l <- readJournalWithOpts []
|
||||||
|
|||||||
@ -10,3 +10,5 @@ bin/hledger -f - balance -p 'in 2009' --effective
|
|||||||
>>>
|
>>>
|
||||||
1 a
|
1 a
|
||||||
-1 b
|
-1 b
|
||||||
|
--------------------
|
||||||
|
0
|
||||||
|
|||||||
@ -6,3 +6,5 @@ bin/hledger -f - balance
|
|||||||
>>>
|
>>>
|
||||||
€1 aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
€1 aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
||||||
€-1 b
|
€-1 b
|
||||||
|
--------------------
|
||||||
|
€0
|
||||||
|
|||||||
@ -4,3 +4,5 @@ bin/hledger -f data/sample.ledger balance --depth 1
|
|||||||
$2 expenses
|
$2 expenses
|
||||||
$-2 income
|
$-2 income
|
||||||
$1 liabilities
|
$1 liabilities
|
||||||
|
--------------------
|
||||||
|
$0
|
||||||
|
|||||||
@ -10,3 +10,5 @@ bin/hledger -f data/sample.ledger balance
|
|||||||
$-1 gifts
|
$-1 gifts
|
||||||
$-1 salary
|
$-1 salary
|
||||||
$1 liabilities:debts
|
$1 liabilities:debts
|
||||||
|
--------------------
|
||||||
|
$0
|
||||||
|
|||||||
@ -6,3 +6,5 @@ bin/hledger -f - balance
|
|||||||
>>>
|
>>>
|
||||||
10 руб τράπεζα
|
10 руб τράπεζα
|
||||||
-10 руб नकद
|
-10 руб नकद
|
||||||
|
--------------------
|
||||||
|
0 руб
|
||||||
|
|||||||
@ -46,3 +46,5 @@ bin/hledger -f-
|
|||||||
-1 b
|
-1 b
|
||||||
10 e
|
10 e
|
||||||
-10 f
|
-10 f
|
||||||
|
--------------------
|
||||||
|
0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user