update budget func. tests

This commit is contained in:
Simon Michael 2018-03-29 15:20:46 +01:00
parent c64d598919
commit 6f8714cdbd

View File

@ -1,4 +1,4 @@
# Test --budget switch # 1. Test --budget switch
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
<<< <<<
2016/12/01 2016/12/01
@ -33,17 +33,17 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
Balance changes in 2016/12/01-2016/12/03: Balance changes in 2016/12/01-2016/12/03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016/12/01 2016/12/02 2016/12/03
=======================++============================================================= =======================++==============================================================================
<unbudgeted>:expenses || 0 0 $40 <unbudgeted>:expenses || 0 0 $40
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10]
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15] expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15]
-----------------------++------------------------------------------------------------- -----------------------++------------------------------------------------------------------------------
|| 0 0 0 || 0 0 0
>>>2 >>>2
>>>=0 >>>=0
# --show-unbudgeted # 2. --show-unbudgeted
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget --show-unbudgeted hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget --show-unbudgeted
<<< <<<
2016/12/01 2016/12/01
@ -78,18 +78,18 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget --show-unbudgeted
Balance changes in 2016/12/01-2016/12/03: Balance changes in 2016/12/01-2016/12/03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016/12/01 2016/12/02 2016/12/03
==================++============================================================= ==================++==============================================================================
assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25] assets:cash || $-10 [ 40% of $-25] $-14 [ 56% of $-25] $-51 [ 204% of $-25]
expenses:cab || 0 0 $15 expenses:cab || 0 0 $15
expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10] expenses:food || $10 [ 100% of $10] $9 [ 90% of $10] $11 [ 110% of $10]
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15] expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15]
expenses:movies || 0 0 $25 expenses:movies || 0 0 $25
------------------++------------------------------------------------------------- ------------------++------------------------------------------------------------------------------
|| 0 0 0 || 0 0 0
>>>2 >>>2
>>>=0 >>>=0
# Test that budget works with mix of commodities # 3. Test that budget works with mix of commodities
hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
<<< <<<
2016/12/01 2016/12/01
@ -128,12 +128,12 @@ hledger bal -D -b 2016-12-01 -e 2016-12-04 -f - --budget
Balance changes in 2016/12/01-2016/12/03: Balance changes in 2016/12/01-2016/12/03:
|| 2016/12/01 2016/12/02 2016/12/03 || 2016/12/01 2016/12/02 2016/12/03
=======================++================================================================ =======================++=======================================================================================
<unbudgeted>:expenses || 0 0 $40 <unbudgeted>:expenses || 0 0 $40
assets:cash || $-15 [ 60% of $-25] $-26.0 [ 104% of $-25] $-51 [ 204% of $-25] assets:cash || $-15 [ 60% of $-25] $-26.0 [ 104% of $-25] $-51 [ 204% of $-25]
expenses:food || £10 [ 150% of $10] 20 CAD [ 210% of $10] $11 [ 110% of $10] expenses:food || £10 [ 150% of $10] 20 CAD [ 210% of $10] $11 [ 110% of $10]
expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15] expenses:leisure || 0 [ 0% of $15] $5 [ 33% of $15] 0 [ 0% of $15]
-----------------------++---------------------------------------------------------------- -----------------------++---------------------------------------------------------------------------------------
|| $-15, £10 $-21.0, 20 CAD 0 || $-15, £10 $-21.0, 20 CAD 0
>>>2 >>>2
>>>=0 >>>=0