hledger/hledger/test/balance/flat.test
Simon Michael e9cd1df048 dev: tests: convert remaining format 1 tests to format 3 (or 2)
Mostly done with an unreleased version of shelltestrunner, plus a few manual fixups.
2023-02-16 11:55:15 -10:00

48 lines
983 B
Plaintext

# --flat shows inclusive balances; total balance should be that of top-level accounts (issue 94)
# # 1.
# hledger -f - balance --flat
# <<<
# 1/1
# (a) 1
# (a:aa) 1
# >>>
# 2 a
# 1 a:aa
# --------------------
# 2
# >>>= 0
# --flat shows exclusive balances
# 1.
<
1/1
(a:aa) 1
(a:aa:aaa) 1
(a:aa:bbb) 1
(b) 1
(b:bb:bbb) 1
$ hledger -f - balance --flat
1 a:aa
1 a:aa:aaa
1 a:aa:bbb
1 b
1 b:bb:bbb
--------------------
5
# --flat --depth shows the same accounts, but clipped and aggregated at the depth limit
# 2.
<
1/1
(a:aa) 1
(a:aa:aaa) 1
(a:aa:bbb) 1
(b) 1
(b:bb:bbb) 1
$ hledger -f - balance --flat --depth 2
3 a:aa
1 b
1 b:bb
--------------------
5