diff --git a/tests/balance/373-layout.test b/tests/balance/373-layout.test index 6b11737e4..2ee042839 100644 --- a/tests/balance/373-layout.test +++ b/tests/balance/373-layout.test @@ -1,41 +1,52 @@ -# Indenting & eliding tests, cf issue 373. +# 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 373.journal bal ->>> +$ hledger -f - bal 0 1:2 1 3 0 4 1 5 -------------------- 0 ->>>= 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 373.journal bal --flat ->>> +$ hledger -f - 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 ->>> +# 3. tabular balance report in flat mode +$ hledger -f - bal -Y Balance changes in 2015: || 2015 @@ -47,11 +58,33 @@ Balance changes in 2015: -----------++------ || 0 ->>>=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: # -hledger -f 373.journal bal -Y --tree ->>> +# || 2015 +# ===========++====== +# 1:2:3 || 1 +# 1:2:3:4:5 || 1 +# -----------++------ +# || +# +$ hledger -f - bal -Y --tree Balance changes in 2015: || 2015 @@ -61,4 +94,6 @@ Balance changes in 2015: -----------++------ || ->>>=0 +# 6. TODO: after 5, test account code sorting +# account 1:2:3 100 +# account 1:2:3:4:5 200 diff --git a/tests/balance/373.journal b/tests/balance/373.journal deleted file mode 100644 index fb0f5271c..000000000 --- a/tests/balance/373.journal +++ /dev/null @@ -1,12 +0,0 @@ -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 -