hledger/tests/comments.test

79 lines
1.3 KiB
Plaintext

# comment tests
# 1.
hledgerdev -f - print
<<<
2009/01/01 x ; transaction comment 1
; transaction comment 2
a 1
b
>>>
2009/01/01 x ; transaction comment 1
; transaction comment 2
a 1
b -1
>>>=0
# 2.
hledgerdev -f - print
<<<
2009/01/01 x
a 1
b
; comment line after postings
>>>
2009/01/01 x
a 1
b -1
>>>=0
# 3. print should preserve comments
hledgerdev -f - print
<<<
; isolated journal comment
; pre-transaction journal comment
2009/1/1 x ; transaction comment
a 1 ; posting 1 comment
; posting 1 comment 2
b
; posting 2 comment
; post-transaction journal comment
>>>
2009/01/01 x ; transaction comment
a 1 ; posting 1 comment
; posting 1 comment 2
b -1 ; posting 2 comment
>>>=0
# 4. a posting comment should appear in print
hledgerdev -f - print
<<<
2010/01/01 x
a 1 ; comment
b -1
>>>
2010/01/01 x
a 1 ; comment
b -1
>>>2
>>>=0
# 5. a posting comment should not appear in register
hledgerdev -f - register
<<<
2010/1/1 x
a 1 ; comment
b
>>>
2010/01/01 x a 1 1
b -1 0
>>>2
>>>=0