metadata test updates

This commit is contained in:
Simon Michael 2012-05-06 20:43:48 +00:00
parent dafa764a07
commit 549bae945c

View File

@ -1,5 +1,5 @@
# we currently should parse and ignore ledger-style metadata attributes # 1. we currently parse metadata tags on transactions and postings, printing
# # the former and ignoring the latter
bin/hledger -f - print bin/hledger -f - print
<<< <<<
2010/01/01 2010/01/01
@ -10,7 +10,7 @@ bin/hledger -f - print
; posting1data2: ; posting1data2:
b -1 b -1
; posting2data1: ; posting2data1:
; posting2nonmetadata: ; non-metadata:
>>> >>>
2010/01/01 2010/01/01
a 1 a 1
@ -19,27 +19,57 @@ bin/hledger -f - print
>>>2 >>>2
>>>=0 >>>=0
bin/hledger -f - print tag key1=value # 2. print (and a few other commands) can filter by tag value
bin/hledger -f - print tag foo=bar
<<< <<<
2010/01/01 2010/01/01
; key:value ; foo:bar
a 1 a 1
b -1 b -1
>>>
>>>2
>>>=0
bin/hledger -f - print tag key=value 2010/01/02
<<< ; foo:baz
2010/01/01 c 1
; key:value d -1
a 1
b -1 2010/01/03
e 1
f -1
>>> >>>
2010/01/01 2010/01/01
; key:value ; foo:bar
a 1 a 1
b -1 b -1
>>>2 >>>2
>>>=0 >>>=0
# # 3. or tag existence ? not yet
# bin/hledger -f - print tag foo
# <<<
# 2010/01/01
# ; foo:bar
# a 1
# b -1
# 2010/01/02
# ; foo:baz
# c 1
# d -1
# 2010/01/03
# e 1
# f -1
# >>>
# 2010/01/01
# ; foo:bar
# a 1
# b -1
# 2010/01/02
# ; foo:baz
# c 1
# d -1
# >>>2
# >>>=0