bs,is,cf: add functional tests, fix bs infinite loop #393

This commit is contained in:
Simon Michael 2016-08-13 07:47:43 -07:00
parent ef961f51ac
commit 5ea088d1ca
4 changed files with 66 additions and 2 deletions

View File

@ -58,8 +58,7 @@ Total:
withoutBeginDate :: ReportOpts -> ReportOpts
withoutBeginDate ropts@ReportOpts{..} = ropts{period_=p}
where
p = dateSpanAsPeriod $ DateSpan Nothing e
e = periodEnd p
p = dateSpanAsPeriod $ DateSpan Nothing (periodEnd period_)
tests_Hledger_Cli_Balancesheet :: Test
tests_Hledger_Cli_Balancesheet = TestList

View File

@ -0,0 +1,23 @@
# 1.
hledger -f - balancesheet
<<<
2016/1/1
assets 1
b
>>>
Balance Sheet
Assets:
1 assets
--------------------
1
Liabilities:
--------------------
0
Total:
--------------------
1
>>>2
>>>= 0

View File

@ -0,0 +1,19 @@
# 1.
hledger -f - cashflow
<<<
2016/1/1
assets 1
b
>>>
Cashflow Statement
Cash flows:
1 assets
--------------------
1
Total:
--------------------
1
>>>2
>>>= 0

View File

@ -0,0 +1,23 @@
# 1.
hledger -f - incomestatement
<<<
2016/1/1
income 1
b
>>>
Income Statement
Revenues:
1 income
--------------------
1
Expenses:
--------------------
0
Total:
--------------------
1
>>>2
>>>= 0