mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 03:42:25 +03:00
simple functional tests for multicolumn modes for is/bs/cf
This commit is contained in:
parent
aa825c5099
commit
ac68ae1349
@ -21,3 +21,108 @@ Total:
|
||||
1
|
||||
>>>2
|
||||
>>>= 0
|
||||
|
||||
# 2.
|
||||
hledger -f sample.journal balancesheet -p 'monthly in 2008'
|
||||
>>>
|
||||
Balance Sheet
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31
|
||||
======================++=================================================================================================================================================
|
||||
Assets ||
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0
|
||||
assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1
|
||||
assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1
|
||||
======================++=================================================================================================================================================
|
||||
Liabilities ||
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 0 0 0 0 0 0 $1
|
||||
======================++=================================================================================================================================================
|
||||
Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0
|
||||
|
||||
|
||||
>>>=0
|
||||
|
||||
# 3.
|
||||
hledger -f sample.journal balancesheet -p 'monthly in 2008' --tree
|
||||
>>>
|
||||
Balance Sheet
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31
|
||||
==============++=================================================================================================================================================
|
||||
Assets ||
|
||||
--------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
assets || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1
|
||||
bank || $1 $1 $1 $1 $1 $2 $2 $2 $2 $2 $2 $1
|
||||
checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0
|
||||
saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1
|
||||
cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2
|
||||
--------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1
|
||||
==============++=================================================================================================================================================
|
||||
Liabilities ||
|
||||
--------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
liabilities || 0 0 0 0 0 0 0 0 0 0 0 $1
|
||||
debts || 0 0 0 0 0 0 0 0 0 0 0 $1
|
||||
--------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 0 0 0 0 0 0 $1
|
||||
==============++=================================================================================================================================================
|
||||
Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
||||
# 4.
|
||||
hledger -f sample.journal balancesheet -p 'monthly in 2008' -A
|
||||
>>>
|
||||
Balance Sheet
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average
|
||||
======================++==========================================================================================================================================================
|
||||
Assets ||
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1
|
||||
assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1
|
||||
assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0
|
||||
======================++==========================================================================================================================================================
|
||||
Liabilities ||
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 0
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 0 0 0 0 0 0 $1 0
|
||||
======================++==========================================================================================================================================================
|
||||
Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 0
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
||||
# 5.
|
||||
hledger -f sample.journal balancesheet -p 'monthly in 2008' -NT
|
||||
>>>
|
||||
Balance Sheet
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Total
|
||||
======================++==========================================================================================================================================================
|
||||
Assets ||
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $11
|
||||
assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $7
|
||||
assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-14
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 $4
|
||||
======================++==========================================================================================================================================================
|
||||
Liabilities ||
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 $1
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 0 0 0 0 0 0 $1 $1
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
40
tests/balancesheet/sample.journal
Normal file
40
tests/balancesheet/sample.journal
Normal file
@ -0,0 +1,40 @@
|
||||
; A sample journal file.
|
||||
;
|
||||
; Sets up this account tree:
|
||||
; assets
|
||||
; bank
|
||||
; checking
|
||||
; saving
|
||||
; cash
|
||||
; expenses
|
||||
; food
|
||||
; supplies
|
||||
; income
|
||||
; gifts
|
||||
; salary
|
||||
; liabilities
|
||||
; debts
|
||||
|
||||
2008/01/01 income
|
||||
assets:bank:checking $1
|
||||
income:salary
|
||||
|
||||
2008/06/01 gift
|
||||
assets:bank:checking $1
|
||||
income:gifts
|
||||
|
||||
2008/06/02 save
|
||||
assets:bank:saving $1
|
||||
assets:bank:checking
|
||||
|
||||
2008/06/03 * eat & shop
|
||||
expenses:food $1
|
||||
expenses:supplies $1
|
||||
assets:cash
|
||||
|
||||
2008/12/31 * pay off
|
||||
liabilities:debts $1
|
||||
assets:bank:checking
|
||||
|
||||
|
||||
;final comment
|
@ -160,3 +160,40 @@ Total:
|
||||
0
|
||||
>>>2
|
||||
>>>= 0
|
||||
|
||||
# 6. Multicolumn test
|
||||
hledger -f sample.journal cashflow -p 'monthly in 2008'
|
||||
>>>
|
||||
Cashflow Statement
|
||||
|
||||
|| 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12
|
||||
======================++=============================================================================================================
|
||||
Cash flows ||
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------
|
||||
assets:bank:checking || $1 0 0 0 0 0 0 0 0 0 0 $-1
|
||||
assets:bank:saving || 0 0 0 0 0 $1 0 0 0 0 0 0
|
||||
assets:cash || 0 0 0 0 0 $-2 0 0 0 0 0 0
|
||||
----------------------++-------------------------------------------------------------------------------------------------------------
|
||||
|| $1 0 0 0 0 $-1 0 0 0 0 0 $-1
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
||||
# 6. Multicolumn test (historical)
|
||||
hledger -f sample.journal cashflow -p 'monthly in 2008' -A --historical
|
||||
>>>
|
||||
Cashflow Statement
|
||||
(Historical Ending Balances)
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average
|
||||
======================++==========================================================================================================================================================
|
||||
Cash flows ||
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1
|
||||
assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1
|
||||
assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1
|
||||
----------------------++----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
40
tests/cashflow/sample.journal
Normal file
40
tests/cashflow/sample.journal
Normal file
@ -0,0 +1,40 @@
|
||||
; A sample journal file.
|
||||
;
|
||||
; Sets up this account tree:
|
||||
; assets
|
||||
; bank
|
||||
; checking
|
||||
; saving
|
||||
; cash
|
||||
; expenses
|
||||
; food
|
||||
; supplies
|
||||
; income
|
||||
; gifts
|
||||
; salary
|
||||
; liabilities
|
||||
; debts
|
||||
|
||||
2008/01/01 income
|
||||
assets:bank:checking $1
|
||||
income:salary
|
||||
|
||||
2008/06/01 gift
|
||||
assets:bank:checking $1
|
||||
income:gifts
|
||||
|
||||
2008/06/02 save
|
||||
assets:bank:saving $1
|
||||
assets:bank:checking
|
||||
|
||||
2008/06/03 * eat & shop
|
||||
expenses:food $1
|
||||
expenses:supplies $1
|
||||
assets:cash
|
||||
|
||||
2008/12/31 * pay off
|
||||
liabilities:debts $1
|
||||
assets:bank:checking
|
||||
|
||||
|
||||
;final comment
|
@ -184,3 +184,56 @@ Total:
|
||||
0
|
||||
>>>2
|
||||
>>>= 0
|
||||
|
||||
# 6. Multicolumn test
|
||||
hledger -f sample.journal incomestatement -p 'monthly in 2008' -AT
|
||||
>>>
|
||||
Income Statement
|
||||
|
||||
|| 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12 Total Average
|
||||
===================++===============================================================================================================================
|
||||
Revenues ||
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------
|
||||
income:gifts || 0 0 0 0 0 $-1 0 0 0 0 0 0 $-1 0
|
||||
income:salary || $-1 0 0 0 0 0 0 0 0 0 0 0 $-1 0
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $-1 0 0 0 0 $-1 0 0 0 0 0 0 $-2 0
|
||||
===================++===============================================================================================================================
|
||||
Expenses ||
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------
|
||||
expenses:food || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0
|
||||
expenses:supplies || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 $2 0 0 0 0 0 0 $2 0
|
||||
===================++===============================================================================================================================
|
||||
Total || $-1 0 0 0 0 $1 0 0 0 0 0 0 0 0
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
||||
# 6. Multicolumn test (historical)
|
||||
hledger -f sample.journal incomestatement -p 'monthly in 2008' --historical
|
||||
>>>
|
||||
Income Statement
|
||||
(Historical Ending Balances)
|
||||
|
||||
|| 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31
|
||||
===================++=================================================================================================================================================
|
||||
Revenues ||
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
income:gifts || 0 0 0 0 0 $-1 $-1 $-1 $-1 $-1 $-1 $-1
|
||||
income:salary || $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| $-1 $-1 $-1 $-1 $-1 $-2 $-2 $-2 $-2 $-2 $-2 $-2
|
||||
===================++=================================================================================================================================================
|
||||
Expenses ||
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
expenses:food || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1
|
||||
expenses:supplies || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1
|
||||
-------------------++-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|| 0 0 0 0 0 $2 $2 $2 $2 $2 $2 $2
|
||||
===================++=================================================================================================================================================
|
||||
Total || $-1 $-1 $-1 $-1 $-1 0 0 0 0 0 0 0
|
||||
|
||||
|
||||
>>>= 0
|
||||
|
40
tests/incomestatement/sample.journal
Normal file
40
tests/incomestatement/sample.journal
Normal file
@ -0,0 +1,40 @@
|
||||
; A sample journal file.
|
||||
;
|
||||
; Sets up this account tree:
|
||||
; assets
|
||||
; bank
|
||||
; checking
|
||||
; saving
|
||||
; cash
|
||||
; expenses
|
||||
; food
|
||||
; supplies
|
||||
; income
|
||||
; gifts
|
||||
; salary
|
||||
; liabilities
|
||||
; debts
|
||||
|
||||
2008/01/01 income
|
||||
assets:bank:checking $1
|
||||
income:salary
|
||||
|
||||
2008/06/01 gift
|
||||
assets:bank:checking $1
|
||||
income:gifts
|
||||
|
||||
2008/06/02 save
|
||||
assets:bank:saving $1
|
||||
assets:bank:checking
|
||||
|
||||
2008/06/03 * eat & shop
|
||||
expenses:food $1
|
||||
expenses:supplies $1
|
||||
assets:cash
|
||||
|
||||
2008/12/31 * pay off
|
||||
liabilities:debts $1
|
||||
assets:bank:checking
|
||||
|
||||
|
||||
;final comment
|
Loading…
Reference in New Issue
Block a user