mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 12:54:07 +03:00
2bb120d6c6
As part of adding -w in december I cleaned up/adjusted register field widths, and didn't make all the tests pass. This commit makes one more width adjustment (one space after the date instead of two) and fixes all tests depending on register output.
83 lines
1.3 KiB
Plaintext
83 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
|
|
|
|
>>>2
|
|
>>>=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
|