hledger/tests/balance/373-layout.test

100 lines
2.4 KiB
Plaintext

# Account name eliding and indenting tests, cf issue 373.
# Documenting current behaviour, some of which looks wrong.
# This file uses https://github.com/simonmichael/shelltestrunner#format-3
<
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
# 1. simple balance report in tree mode with zero/boring parents
# TODO should be like
#$ ledger bal
# 1 1:2:3
# 1 4:5
#--------------------
# 0
$ hledger -f - bal
0 1:2
1 3
0 4
1 5
--------------------
0
# 2. simple balance report in flat mode
# TODO should be like
#$ ledger bal --flat
# 1 1:2:3
# 1 1:2:3:4:5
#--------------------
# 0
$ hledger -f - bal --flat
-1 1:2
1 1:2:3
-1 1:2:3:4
1 1:2:3:4:5
--------------------
0
# 3. tabular balance report in flat mode
$ hledger -f - 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
# 4. tabular balance report in tree mode, showing zero accounts
$ hledger -f - bal -Y --tree -E
Balance changes in 2015:
|| 2015
===========++======
1 || 0
2 || 0
3 || 1
4 || 0
5 || 1
-----------++------
|| 0
# 5. tabular balance report in tree mode, hiding zero accounts
# Undisplayed parent accounts should be mentioned in the displayed account names as necessary
# TODO: should be like
# Balance changes in 2015:
#
# || 2015
# ===========++======
# 1:2:3 || 1
# 1:2:3:4:5 || 1
# -----------++------
# ||
#
$ hledger -f - bal -Y --tree
Balance changes in 2015:
|| 2015
===========++======
3 || 1
5 || 1
-----------++------
||
# 6. TODO: after 5, test account code sorting
# account 1:2:3 100
# account 1:2:3:4:5 200