mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
budget: convert tests to format 3
This commit is contained in:
parent
083d9190fd
commit
38289686b7
@ -1,6 +1,5 @@
|
||||
# 1. Test --budget switch
|
||||
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
<<<
|
||||
# balance --budget tests
|
||||
|
||||
2016/12/01
|
||||
expenses:food $10
|
||||
assets:cash
|
||||
@ -29,7 +28,10 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
expenses:food $10
|
||||
expenses:leisure $15
|
||||
assets:cash
|
||||
>>>
|
||||
|
||||
|
||||
# 1. Test --budget switch
|
||||
$ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
Balance changes in 2016/12/01-2016/12/03:
|
||||
|
||||
|| 2016/12/01 2016/12/02 2016/12/03
|
||||
@ -40,41 +42,9 @@ Balance changes in 2016/12/01-2016/12/03:
|
||||
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15]
|
||||
-----------------------++------------------------------------------------------------------------------
|
||||
|| 0 0 0
|
||||
>>>2
|
||||
>>>=0
|
||||
|
||||
# 2. --show-unbudgeted
|
||||
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget --show-unbudgeted
|
||||
<<<
|
||||
2016/12/01
|
||||
expenses:food $10
|
||||
assets:cash
|
||||
|
||||
2016/12/02
|
||||
expenses:food $9
|
||||
assets:cash
|
||||
|
||||
2016/12/03
|
||||
expenses:food $11
|
||||
assets:cash
|
||||
|
||||
2016/12/02
|
||||
expenses:leisure $5
|
||||
assets:cash
|
||||
|
||||
2016/12/03
|
||||
expenses:movies $25
|
||||
assets:cash
|
||||
|
||||
2016/12/03
|
||||
expenses:cab $15
|
||||
assets:cash
|
||||
|
||||
~ daily from 2016/1/1
|
||||
expenses:food $10
|
||||
expenses:leisure $15
|
||||
assets:cash
|
||||
>>>
|
||||
$ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget --show-unbudgeted
|
||||
Balance changes in 2016/12/01-2016/12/03:
|
||||
|
||||
|| 2016/12/01 2016/12/02 2016/12/03
|
||||
@ -86,12 +56,9 @@ Balance changes in 2016/12/01-2016/12/03:
|
||||
expenses:movies || 0 0 $25
|
||||
------------------++------------------------------------------------------------------------------
|
||||
|| 0 0 0
|
||||
>>>2
|
||||
>>>=0
|
||||
|
||||
# 3. Test that budget works with mix of commodities
|
||||
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
<<<
|
||||
<
|
||||
2016/12/01
|
||||
expenses:food £10 @@ $15
|
||||
assets:cash
|
||||
@ -124,7 +91,8 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
expenses:food $10
|
||||
expenses:leisure $15
|
||||
assets:cash
|
||||
>>>
|
||||
|
||||
$ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
|
||||
Balance changes in 2016/12/01-2016/12/03:
|
||||
|
||||
|| 2016/12/01 2016/12/02 2016/12/03
|
||||
@ -135,5 +103,3 @@ Balance changes in 2016/12/01-2016/12/03:
|
||||
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15]
|
||||
-----------------------++---------------------------------------------------------------------------------------
|
||||
|| $-15, £10 $-21.0, 20 CAD 0
|
||||
>>>2
|
||||
>>>=0
|
||||
|
Loading…
Reference in New Issue
Block a user