diff --git a/hledger/Hledger/Cli/Balancesheet.hs b/hledger/Hledger/Cli/Balancesheet.hs index eb774e136..5709d4b32 100644 --- a/hledger/Hledger/Cli/Balancesheet.hs +++ b/hledger/Hledger/Cli/Balancesheet.hs @@ -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 diff --git a/tests/balancesheet/balancesheet.test b/tests/balancesheet/balancesheet.test new file mode 100644 index 000000000..2ee0b009a --- /dev/null +++ b/tests/balancesheet/balancesheet.test @@ -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 diff --git a/tests/cashflow/cashflow.test b/tests/cashflow/cashflow.test new file mode 100644 index 000000000..e8ef2e817 --- /dev/null +++ b/tests/cashflow/cashflow.test @@ -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 diff --git a/tests/incomestatement/incomestatement.test b/tests/incomestatement/incomestatement.test new file mode 100644 index 000000000..39c63d6b7 --- /dev/null +++ b/tests/incomestatement/incomestatement.test @@ -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