summaryrefslogtreecommitdiff
path: root/test/baseline/opt-forecast-while.test
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-27 21:32:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-27 21:32:55 -0400
commitab433d28e08bbe23bbc75d333ed63343356e043a (patch)
tree273377e30b59a28de199e45fe66519ff8a387bf3 /test/baseline/opt-forecast-while.test
parentaae134f69275e4f71ec70d893cdfd0b5839fef8e (diff)
downloadfork-ledger-ab433d28e08bbe23bbc75d333ed63343356e043a.tar.gz
fork-ledger-ab433d28e08bbe23bbc75d333ed63343356e043a.tar.bz2
fork-ledger-ab433d28e08bbe23bbc75d333ed63343356e043a.zip
Support a --now option, for testing purposes
This sets Ledger's notion of the "current time" to the given date. This makes it possible to have stable output from budgeting and forecasting reports, for the sake of baseline tests.
Diffstat (limited to 'test/baseline/opt-forecast-while.test')
-rw-r--r--test/baseline/opt-forecast-while.test285
1 files changed, 285 insertions, 0 deletions
diff --git a/test/baseline/opt-forecast-while.test b/test/baseline/opt-forecast-while.test
new file mode 100644
index 00000000..e3f1c57a
--- /dev/null
+++ b/test/baseline/opt-forecast-while.test
@@ -0,0 +1,285 @@
+reg --now=2009/03/21 --forecast-while='total < $3500' 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-31 End of January Expenses:Books $10.00 $20.00
+08-Feb-01 February Expenses:Books $20.00 $40.00
+08-Feb-28 End of February Expenses:Books $20.00 $60.00
+08-Mar-01 March Expenses:Books $30.00 $90.00
+08-Mar-31 End of March Expenses:Books $30.00 $120.00
+08-Apr-01 April Expenses:Books $40.00 $160.00
+08-Apr-30 End of April Expenses:Books $40.00 $200.00
+08-May-01 May Expenses:Books $50.00 $250.00
+08-May-31 End of May Expenses:Books $50.00 $300.00
+08-Jun-01 June Expenses:Books $60.00 $360.00
+08-Jun-30 End of June Expenses:Books $60.00 $420.00
+08-Jul-01 July Expenses:Books $70.00 $490.00
+08-Jul-31 End of July Expenses:Books $70.00 $560.00
+08-Aug-01 August Expenses:Books $80.00 $640.00
+08-Aug-31 End of August Expenses:Books $80.00 $720.00
+08-Sep-01 September Expenses:Books $90.00 $810.00
+08-Sep-30 End of September Expenses:Books $90.00 $900.00
+08-Oct-01 October Expenses:Books $100.00 $1000.00
+08-Oct-31 End of October Expenses:Books $100.00 $1100.00
+08-Nov-01 November Expenses:Books $110.00 $1210.00
+08-Nov-30 End of November Expenses:Books $110.00 $1320.00
+08-Dec-01 December Expenses:Books $120.00 $1440.00
+08-Dec-31 End of December Expenses:Books $120.00 $1560.00
+09-Jan-01 January Expenses:Books $10.00 $1570.00
+09-Jan-31 End of January Expenses:Books $10.00 $1580.00
+09-Feb-01 February Expenses:Books $20.00 $1600.00
+09-Feb-28 End of February Expenses:Books $20.00 $1620.00
+09-Mar-01 March Expenses:Books $30.00 $1650.00
+09-Mar-31 End of March Expenses:Books $30.00 $1680.00
+09-Apr-01 April Expenses:Books $40.00 $1720.00
+09-Apr-30 End of April Expenses:Books $40.00 $1760.00
+09-May-01 May Expenses:Books $50.00 $1810.00
+09-May-31 End of May Expenses:Books $50.00 $1860.00
+09-Jun-01 June Expenses:Books $60.00 $1920.00
+09-Jun-30 End of June Expenses:Books $60.00 $1980.00
+09-Jul-01 July Expenses:Books $70.00 $2050.00
+09-Jul-31 End of July Expenses:Books $70.00 $2120.00
+09-Aug-01 August Expenses:Books $80.00 $2200.00
+09-Aug-31 End of August Expenses:Books $80.00 $2280.00
+09-Sep-01 September Expenses:Books $90.00 $2370.00
+09-Sep-30 End of September Expenses:Books $90.00 $2460.00
+09-Oct-01 October Expenses:Books $100.00 $2560.00
+09-Oct-31 End of October Expenses:Books $100.00 $2660.00
+09-Nov-01 November Expenses:Books $110.00 $2770.00
+09-Nov-30 End of November Expenses:Books $110.00 $2880.00
+09-Dec-01 December Expenses:Books $120.00 $3000.00
+09-Dec-31 End of December Expenses:Books $120.00 $3120.00
+09-Apr-01 Forecast transaction Expenses:Books $10.00 $3130.00
+09-May-01 Forecast transaction Expenses:Books $10.00 $3140.00
+09-Jun-01 Forecast transaction Expenses:Books $10.00 $3150.00
+09-Jul-01 Forecast transaction Expenses:Books $10.00 $3160.00
+09-Aug-01 Forecast transaction Expenses:Books $10.00 $3170.00
+09-Sep-01 Forecast transaction Expenses:Books $10.00 $3180.00
+09-Oct-01 Forecast transaction Expenses:Books $10.00 $3190.00
+09-Nov-01 Forecast transaction Expenses:Books $10.00 $3200.00
+09-Dec-01 Forecast transaction Expenses:Books $10.00 $3210.00
+10-Jan-01 Forecast transaction Expenses:Books $10.00 $3220.00
+10-Feb-01 Forecast transaction Expenses:Books $10.00 $3230.00
+10-Mar-01 Forecast transaction Expenses:Books $10.00 $3240.00
+10-Apr-01 Forecast transaction Expenses:Books $10.00 $3250.00
+10-May-01 Forecast transaction Expenses:Books $10.00 $3260.00
+10-Jun-01 Forecast transaction Expenses:Books $10.00 $3270.00
+10-Jul-01 Forecast transaction Expenses:Books $10.00 $3280.00
+10-Aug-01 Forecast transaction Expenses:Books $10.00 $3290.00
+10-Sep-01 Forecast transaction Expenses:Books $10.00 $3300.00
+10-Oct-01 Forecast transaction Expenses:Books $10.00 $3310.00
+10-Nov-01 Forecast transaction Expenses:Books $10.00 $3320.00
+10-Dec-01 Forecast transaction Expenses:Books $10.00 $3330.00
+11-Jan-01 Forecast transaction Expenses:Books $10.00 $3340.00
+11-Feb-01 Forecast transaction Expenses:Books $10.00 $3350.00
+11-Mar-01 Forecast transaction Expenses:Books $10.00 $3360.00
+11-Apr-01 Forecast transaction Expenses:Books $10.00 $3370.00
+11-May-01 Forecast transaction Expenses:Books $10.00 $3380.00
+11-Jun-01 Forecast transaction Expenses:Books $10.00 $3390.00
+11-Jul-01 Forecast transaction Expenses:Books $10.00 $3400.00
+11-Aug-01 Forecast transaction Expenses:Books $10.00 $3410.00
+11-Sep-01 Forecast transaction Expenses:Books $10.00 $3420.00
+11-Oct-01 Forecast transaction Expenses:Books $10.00 $3430.00
+11-Nov-01 Forecast transaction Expenses:Books $10.00 $3440.00
+11-Dec-01 Forecast transaction Expenses:Books $10.00 $3450.00
+12-Jan-01 Forecast transaction Expenses:Books $10.00 $3460.00
+12-Feb-01 Forecast transaction Expenses:Books $10.00 $3470.00
+12-Mar-01 Forecast transaction Expenses:Books $10.00 $3480.00
+12-Apr-01 Forecast transaction Expenses:Books $10.00 $3490.00
+>>>2
+=== 0