hledger/tests/register/depth.test
Simon Michael aa85e786b9 register: describe datespans briefly, like balance
Eg instead of 2014/01/01 - 2014/01/31, show 2014/01, as in a multicolumn
balance report. The data model is not very elegant, but works for now.
2014-08-08 07:34:11 -07:00

59 lines
1.3 KiB
Plaintext

# 1. register --depth N matches postings as usual but clips account names to N
hledgerdev -f - register aa --depth 1
<<<
2010/1/1 x
a:aa:aaa 1
b
>>>
2010/01/01 x a 1 1
>>>=0
# 2. similar to above, postings with same clipped account name are not aggregated
hledgerdev -f - register aa --depth 2
<<<
2010/1/1 x
a:aa 1
b:bb:bbb
2010/1/1 y
a:aa 1
b:bb:bbb
2010/1/2 z
a:aa 1
b:bb:bbb
>>>
2010/01/01 x a:aa 1 1
2010/01/01 y a:aa 1 2
2010/01/02 z a:aa 1 3
>>>=0
# 3. as above, but with a reporting interval causing postings to be aggregated
hledgerdev -f - register aa --depth 1 --daily
<<<
2010/1/1 x
a:aa 1
b:bb:bbb
2010/1/1 y
a:aa 1
b:bb:bbb
2010/1/2 z
a:aa 1
b:bb:bbb
>>>
2010/01/01d a 2 2
2010/01/02d a 1 3
>>>=0
# 4. with --cleared
hledgerdev -f - register a --depth 1 --cleared
<<<
2012/1/1 *
(a:aa) 1
>>>
2012/01/01 (a) 1 1
>>>2
>>>=0