hledger/tests/journal/comments.test
Simon Michael 21d9945ba9 tests: make functional tests use "hledger" again
Using "hledgerdev" was a hack to help ensure that tests used a fresh
developer build by default. Now they specify "hledger" again, which fits
better with stack. It's up to the tester to make sure the desired
executable is first in PATH or specified with -w. (Note a couple of
tests currently don't obey -w and will always run "hledger", see addons.test).
2015-07-12 12:29:53 -07:00

87 lines
1.6 KiB
Plaintext

# comment tests
# 1.
hledger -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.
hledger -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 transaction (entry) comments and which line they're on
hledger -f - print
<<<
; leading journal comment, not preserved
; transaction preceding comment, not preserved
2009/1/1 x ; transaction same line comment
; transaction new line comment
a 1 ; posting 1 same line comment
; posting 1 new line comment
b
; posting 2 new line comment
; journal comment right after the transaction, not preserved
; trailing journal comment, not preserved
>>>
2009/01/01 x ; transaction same line comment
; transaction new line comment
a 1 ; posting 1 same line comment
; posting 1 new line comment
b -1
; posting 2 new line comment
>>>2
>>>=0
# 4. a posting comment should appear in print
hledger -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
hledger -f - register
<<<
2010/1/1 x
a 1 ; comment
b
>>>
2010/01/01 x a 1 1
b -1 0
>>>2
>>>=0