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,16 +1,16 @@
# 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
<<<
2010/01/01
; txndata1: txn val 1
; txndata2: txn val 2
a 1
; posting1data1: posting1 val 1
; posting1data2:
b -1
; posting2data1:
; posting2nonmetadata:
; txndata1: txn val 1
; txndata2: txn val 2
a 1
; posting1data1: posting1 val 1
; posting1data2:
b -1
; posting2data1:
; non-metadata:
>>>
2010/01/01
a 1
@ -19,27 +19,57 @@ bin/hledger -f - print
>>>2
>>>=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
; key:value
a 1
b -1
>>>
>>>2
>>>=0
; foo:bar
a 1
b -1
bin/hledger -f - print tag key=value
<<<
2010/01/01
; key:value
a 1
b -1
2010/01/02
; foo:baz
c 1
d -1
2010/01/03
e 1
f -1
>>>
2010/01/01
; key:value
; foo:bar
a 1
b -1
>>>2
>>>=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