hledger/tests/virtual.test

49 lines
820 B
Plaintext
Raw Normal View History

# 1. virtual posting shouldn't affect balance
2010-05-22 04:52:45 +04:00
bin/hledger -f-
2009-06-27 15:02:28 +04:00
<<<
2009/1/1 x
(virtual) 100
a 1
b
#
# 2. balanced virtual postings should be required to balance (themselves)
2010-05-22 04:52:45 +04:00
bin/hledger -f-
<<<
2010/1/1 x
[balanced virtual] 10
a 1
b
>>>= !0
#
# 3. balanced virtual postings should be required to balance (themselves)
2010-05-22 04:52:45 +04:00
bin/hledger -f-
<<<
2010/1/1 x
[balanced virtual] 10
[balanced virtual] -10
a 1
b
#
# 4. a virtual posting with implicit amount should be handled correctly
2010-05-22 04:52:45 +04:00
bin/hledger -f-
<<<
2010/1/1 x
[a] 10
[b]
#
# 5. real and balanced virtual postings are balanced separately, and multiple blank virtuals are ok
2010-05-22 04:52:45 +04:00
bin/hledger -f-
<<<
2010/1/1 x
a 1
b
[e] 10
[f]
(c)
(d)
>>>
1 a
-1 b
10 e
-10 f