diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-20 23:08:42 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-20 23:12:23 -0400 |
commit | fc349389e3f074ae2ce22b93f3833f063f548a8f (patch) | |
tree | b235bf0a9b6ca21aac1bcd56c8462f5570202723 /test | |
parent | 96ff798736cd06812fb7e463c14d6c356c8228e3 (diff) | |
download | fork-ledger-fc349389e3f074ae2ce22b93f3833f063f548a8f.tar.gz fork-ledger-fc349389e3f074ae2ce22b93f3833f063f548a8f.tar.bz2 fork-ledger-fc349389e3f074ae2ce22b93f3833f063f548a8f.zip |
Restored the --budget option
Diffstat (limited to 'test')
-rw-r--r-- | test/baseline/opt-budget.test | 272 | ||||
-rw-r--r-- | test/unit/t_amount.cc | 18 |
2 files changed, 281 insertions, 9 deletions
diff --git a/test/baseline/opt-budget.test b/test/baseline/opt-budget.test new file mode 100644 index 00000000..154a61d8 --- /dev/null +++ b/test/baseline/opt-budget.test @@ -0,0 +1,272 @@ +reg --budget books +<<< +~ monthly + Expenses:Books $10.00 + Assets:Cash + +2008/01/01 January + Expenses:Books $10.00 + Assets:Cash + +2008/01/31 End of January + Expenses:Books $10.00 + Assets:Cash + +2008/02/01 February + Expenses:Books $20.00 + Assets:Cash + +2008/02/28 End of February + Expenses:Books $20.00 + Assets:Cash + +2008/03/01 March + Expenses:Books $30.00 + Assets:Cash + +2008/03/31 End of March + Expenses:Books $30.00 + Assets:Cash + +2008/04/01 April + Expenses:Books $40.00 + Assets:Cash + +2008/04/30 End of April + Expenses:Books $40.00 + Assets:Cash + +2008/05/01 May + Expenses:Books $50.00 + Assets:Cash + +2008/05/31 End of May + Expenses:Books $50.00 + Assets:Cash + +2008/06/01 June + Expenses:Books $60.00 + Assets:Cash + +2008/06/30 End of June + Expenses:Books $60.00 + Assets:Cash + +2008/07/01 July + Expenses:Books $70.00 + Assets:Cash + +2008/07/31 End of July + Expenses:Books $70.00 + Assets:Cash + +2008/08/01 August + Expenses:Books $80.00 + Assets:Cash + +2008/08/31 End of August + Expenses:Books $80.00 + Assets:Cash + +2008/09/01 September + Expenses:Books $90.00 + Assets:Cash + +2008/09/30 End of September + Expenses:Books $90.00 + Assets:Cash + +2008/10/01 October + Expenses:Books $100.00 + Assets:Cash + +2008/10/31 End of October + Expenses:Books $100.00 + Assets:Cash + +2008/11/01 November + Expenses:Books $110.00 + Assets:Cash + +2008/11/30 End of November + Expenses:Books $110.00 + Assets:Cash + +2008/12/01 December + Expenses:Books $120.00 + Assets:Cash + +2008/12/31 End of December + Expenses:Books $120.00 + Assets:Cash + +2009/01/01 January + Expenses:Books $10.00 + Assets:Cash + +2009/01/31 End of January + Expenses:Books $10.00 + Assets:Cash + +2009/02/01 February + Expenses:Books $20.00 + Assets:Cash + +2009/02/28 End of February + Expenses:Books $20.00 + Assets:Cash + +2009/03/01 March + Expenses:Books $30.00 + Assets:Cash + +2009/03/31 End of March + Expenses:Books $30.00 + Assets:Cash + +2009/04/01 April + Expenses:Books $40.00 + Assets:Cash + +2009/04/30 End of April + Expenses:Books $40.00 + Assets:Cash + +2009/05/01 May + Expenses:Books $50.00 + Assets:Cash + +2009/05/31 End of May + Expenses:Books $50.00 + Assets:Cash + +2009/06/01 June + Expenses:Books $60.00 + Assets:Cash + +2009/06/30 End of June + Expenses:Books $60.00 + Assets:Cash + +2009/07/01 July + Expenses:Books $70.00 + Assets:Cash + +2009/07/31 End of July + Expenses:Books $70.00 + Assets:Cash + +2009/08/01 August + Expenses:Books $80.00 + Assets:Cash + +2009/08/31 End of August + Expenses:Books $80.00 + Assets:Cash + +2009/09/01 September + Expenses:Books $90.00 + Assets:Cash + +2009/09/30 End of September + Expenses:Books $90.00 + Assets:Cash + +2009/10/01 October + Expenses:Books $100.00 + Assets:Cash + +2009/10/31 End of October + Expenses:Books $100.00 + Assets:Cash + +2009/11/01 November + Expenses:Books $110.00 + Assets:Cash + +2009/11/30 End of November + Expenses:Books $110.00 + Assets:Cash + +2009/12/01 December + Expenses:Books $120.00 + Assets:Cash + +2009/12/31 End of December + Expenses:Books $120.00 + Assets:Cash +>>>1 +08-Jan-01 January Expenses:Books $10.00 $10.00 +08-Jan-01 Budget entry Expenses:Books $-10.00 0 +08-Jan-31 End of January Expenses:Books $10.00 $10.00 +08-Feb-01 February Expenses:Books $20.00 $30.00 +08-Feb-01 Budget entry Expenses:Books $-10.00 $20.00 +08-Feb-28 End of February Expenses:Books $20.00 $40.00 +08-Mar-01 March Expenses:Books $30.00 $70.00 +08-Mar-01 Budget entry Expenses:Books $-10.00 $60.00 +08-Mar-31 End of March Expenses:Books $30.00 $90.00 +08-Apr-01 April Expenses:Books $40.00 $130.00 +08-Apr-01 Budget entry Expenses:Books $-10.00 $120.00 +08-Apr-30 End of April Expenses:Books $40.00 $160.00 +08-May-01 May Expenses:Books $50.00 $210.00 +08-May-01 Budget entry Expenses:Books $-10.00 $200.00 +08-May-31 End of May Expenses:Books $50.00 $250.00 +08-Jun-01 June Expenses:Books $60.00 $310.00 +08-Jun-01 Budget entry Expenses:Books $-10.00 $300.00 +08-Jun-30 End of June Expenses:Books $60.00 $360.00 +08-Jul-01 July Expenses:Books $70.00 $430.00 +08-Jul-01 Budget entry Expenses:Books $-10.00 $420.00 +08-Jul-31 End of July Expenses:Books $70.00 $490.00 +08-Aug-01 August Expenses:Books $80.00 $570.00 +08-Aug-01 Budget entry Expenses:Books $-10.00 $560.00 +08-Aug-31 End of August Expenses:Books $80.00 $640.00 +08-Sep-01 September Expenses:Books $90.00 $730.00 +08-Sep-01 Budget entry Expenses:Books $-10.00 $720.00 +08-Sep-30 End of September Expenses:Books $90.00 $810.00 +08-Oct-01 October Expenses:Books $100.00 $910.00 +08-Oct-01 Budget entry Expenses:Books $-10.00 $900.00 +08-Oct-31 End of October Expenses:Books $100.00 $1000.00 +08-Nov-01 November Expenses:Books $110.00 $1110.00 +08-Nov-01 Budget entry Expenses:Books $-10.00 $1100.00 +08-Nov-30 End of November Expenses:Books $110.00 $1210.00 +08-Dec-01 December Expenses:Books $120.00 $1330.00 +08-Dec-01 Budget entry Expenses:Books $-10.00 $1320.00 +08-Dec-31 End of December Expenses:Books $120.00 $1440.00 +09-Jan-01 January Expenses:Books $10.00 $1450.00 +09-Jan-01 Budget entry Expenses:Books $-10.00 $1440.00 +09-Jan-31 End of January Expenses:Books $10.00 $1450.00 +09-Feb-01 February Expenses:Books $20.00 $1470.00 +09-Feb-01 Budget entry Expenses:Books $-10.00 $1460.00 +09-Feb-28 End of February Expenses:Books $20.00 $1480.00 +09-Mar-01 March Expenses:Books $30.00 $1510.00 +09-Mar-01 Budget entry Expenses:Books $-10.00 $1500.00 +09-Mar-31 End of March Expenses:Books $30.00 $1530.00 +09-Apr-01 April Expenses:Books $40.00 $1570.00 +09-Apr-01 Budget entry Expenses:Books $-10.00 $1560.00 +09-Apr-30 End of April Expenses:Books $40.00 $1600.00 +09-May-01 May Expenses:Books $50.00 $1650.00 +09-May-01 Budget entry Expenses:Books $-10.00 $1640.00 +09-May-31 End of May Expenses:Books $50.00 $1690.00 +09-Jun-01 June Expenses:Books $60.00 $1750.00 +09-Jun-01 Budget entry Expenses:Books $-10.00 $1740.00 +09-Jun-30 End of June Expenses:Books $60.00 $1800.00 +09-Jul-01 July Expenses:Books $70.00 $1870.00 +09-Jul-01 Budget entry Expenses:Books $-10.00 $1860.00 +09-Jul-31 End of July Expenses:Books $70.00 $1930.00 +09-Aug-01 August Expenses:Books $80.00 $2010.00 +09-Aug-01 Budget entry Expenses:Books $-10.00 $2000.00 +09-Aug-31 End of August Expenses:Books $80.00 $2080.00 +09-Sep-01 September Expenses:Books $90.00 $2170.00 +09-Sep-01 Budget entry Expenses:Books $-10.00 $2160.00 +09-Sep-30 End of September Expenses:Books $90.00 $2250.00 +09-Oct-01 October Expenses:Books $100.00 $2350.00 +09-Oct-01 Budget entry Expenses:Books $-10.00 $2340.00 +09-Oct-31 End of October Expenses:Books $100.00 $2440.00 +09-Nov-01 November Expenses:Books $110.00 $2550.00 +09-Nov-01 Budget entry Expenses:Books $-10.00 $2540.00 +09-Nov-30 End of November Expenses:Books $110.00 $2650.00 +09-Dec-01 December Expenses:Books $120.00 $2770.00 +09-Dec-01 Budget entry Expenses:Books $-10.00 $2760.00 +09-Dec-31 End of December Expenses:Books $120.00 $2880.00 +>>>2 +=== 0 diff --git a/test/unit/t_amount.cc b/test/unit/t_amount.cc index 94553912..7e0f53b0 100644 --- a/test/unit/t_amount.cc +++ b/test/unit/t_amount.cc @@ -993,15 +993,15 @@ void AmountTestCase::testNegation() amount_t x8(string("-123.456")); amount_t x9(- x3); - assertThrow(x0.negate(), amount_error); + assertThrow(x0.negated(), amount_error); assertEqual(x5, x1); assertEqual(x7, x1); assertEqual(x6, x3); assertEqual(x8, x3); assertEqual(- x6, x9); - assertEqual(x3.negate(), x9); + assertEqual(x3.negated(), x9); - amount_t x10(x9.negate()); + amount_t x10(x9.negated()); assertEqual(x3, x10); @@ -1039,9 +1039,9 @@ void AmountTestCase::testCommodityNegation() assertEqual(amount_t("-123.45€"), - x9); assertEqual(amount_t("123.45€"), - x10); - assertEqual(amount_t("$-123.45"), x1.negate()); - assertEqual(amount_t("$123.45"), x2.negate()); - assertEqual(amount_t("$123.45"), x3.negate()); + assertEqual(amount_t("$-123.45"), x1.negated()); + assertEqual(amount_t("$123.45"), x2.negated()); + assertEqual(amount_t("$123.45"), x3.negated()); assertEqual(string("$-123.45"), (- x1).to_string()); assertEqual(string("$123.45"), (- x2).to_string()); @@ -1054,9 +1054,9 @@ void AmountTestCase::testCommodityNegation() assertEqual(string("-123.45€"), (- x9).to_string()); assertEqual(string("123.45€"), (- x10).to_string()); - assertEqual(amount_t("$-123.45"), x1.negate()); - assertEqual(amount_t("$123.45"), x2.negate()); - assertEqual(amount_t("$123.45"), x3.negate()); + assertEqual(amount_t("$-123.45"), x1.negated()); + assertEqual(amount_t("$123.45"), x2.negated()); + assertEqual(amount_t("$123.45"), x3.negated()); assertValid(x1); assertValid(x2); |