mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
21d9945ba9
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).
55 lines
898 B
Plaintext
55 lines
898 B
Plaintext
# 1. virtual posting shouldn't affect balance
|
|
hledger -f- print
|
|
<<<
|
|
2009/1/1 x
|
|
(virtual) 100
|
|
a 1
|
|
b
|
|
>>>=0
|
|
#
|
|
# 2. balanced virtual postings should be required to balance (themselves)
|
|
hledger -f- print
|
|
<<<
|
|
2010/1/1 x
|
|
[balanced virtual] 10
|
|
a 1
|
|
b
|
|
>>>= !0
|
|
#
|
|
# 3. balanced virtual postings should be required to balance (themselves)
|
|
hledger -f- print
|
|
<<<
|
|
2010/1/1 x
|
|
[balanced virtual] 10
|
|
[balanced virtual] -10
|
|
a 1
|
|
b
|
|
>>>=0
|
|
#
|
|
# 4. a virtual posting with implicit amount should be handled correctly
|
|
hledger -f- print
|
|
<<<
|
|
2010/1/1 x
|
|
[a] 10
|
|
[b]
|
|
>>>=0
|
|
#
|
|
# 5. real and balanced virtual postings are balanced separately, and multiple blank virtuals are ok
|
|
hledger -f- balance
|
|
<<<
|
|
2010/1/1 x
|
|
a 1
|
|
b
|
|
[e] 10
|
|
[f]
|
|
(c)
|
|
(d)
|
|
>>>
|
|
1 a
|
|
-1 b
|
|
10 e
|
|
-10 f
|
|
--------------------
|
|
0
|
|
>>>=0
|