bal: draft some tests for #373

This commit is contained in:
Simon Michael 2016-09-21 09:34:01 -07:00
parent c3326ba943
commit 18bed45e1a
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,64 @@
# Indenting & eliding tests, cf issue 373.
# Documenting current behaviour, some of which looks wrong.
#
#$ ledger bal
# 1 1:2:3
# 1 4:5
#--------------------
# 0
hledger -f 373.journal bal
>>>
0 1:2
1 3
0 4
1 5
--------------------
0
>>>= 0
#
#$ ledger bal --flat
# 1 1:2:3
# 1 1:2:3:4:5
#--------------------
# 0
hledger -f 373.journal bal --flat
>>>
-1 1:2
1 1:2:3
-1 1:2:3:4
1 1:2:3:4:5
--------------------
0
>>>= 0
#
hledger -f 373.journal bal -Y
>>>
Balance changes in 2015:
|| 2015
===========++=======
1:2 || -1
1:2:3 || 1
1:2:3:4 || -1
1:2:3:4:5 || 1
-----------++-------
|| 0
>>>=0
#
hledger -f 373.journal bal -Y --tree
>>>
Balance changes in 2015:
|| 2015
===========++=======
3 || 1
5 || 1
-----------++-------
||
>>>=0

12
tests/balance/373.journal Normal file
View File

@ -0,0 +1,12 @@
2015-01-01
1 1
1:2 -1
2015-01-02
1:2:3 1
1:2:3:4 -1
2015-01-03
1:2:3:4:5 1
1 -1