diff options
Diffstat (limited to 'test/baseline')
-rw-r--r-- | test/baseline/opt-account.test | 4 | ||||
-rw-r--r-- | test/baseline/opt-code-as-account.test | 20 | ||||
-rw-r--r-- | test/baseline/opt-commodity-as-account.test | 4 | ||||
-rw-r--r-- | test/baseline/opt-payee-as-account.test | 20 | ||||
-rw-r--r-- | test/baseline/opt-pricedb-format.test | 2 | ||||
-rw-r--r-- | test/baseline/opt-prices-format.test | 2 | ||||
-rw-r--r-- | test/baseline/opt-unrealized-gains.test | 20 | ||||
-rw-r--r-- | test/baseline/opt-unrealized-losses.test | 20 | ||||
-rw-r--r-- | test/baseline/opt-unrealized.test | 28 | ||||
-rw-r--r-- | test/baseline/test-sample.dat | 91 |
10 files changed, 187 insertions, 24 deletions
diff --git a/test/baseline/opt-account.test b/test/baseline/opt-account.test index 7cda3c4d..10176fde 100644 --- a/test/baseline/opt-account.test +++ b/test/baseline/opt-account.test @@ -4,8 +4,8 @@ reg --account='payee + ":" + commodity' Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00 Income:Dividends:Vanguard:VMMXX $-0.35 >>>1 -07-Feb-02 RD VMMXX RD VMMXX:VMMXX 0.350 VMMXX 0.350 VMMXX -07-Feb-02 RD VMMXX RD VMMXX:$ $-0.35 $-0.35 +07-Feb-02 RD VMMXX RD:VM:As:In:Va:VMMXX 0.350 VMMXX 0.350 VMMXX +07-Feb-02 RD VMMXX RD:$:In:Di:Va:VMMXX $-0.35 $-0.35 0.350 VMMXX >>>2 === 0 diff --git a/test/baseline/opt-code-as-account.test b/test/baseline/opt-code-as-account.test index c669427e..bb1bf759 100644 --- a/test/baseline/opt-code-as-account.test +++ b/test/baseline/opt-code-as-account.test @@ -20,15 +20,15 @@ reg --account=code Expenses:Books $30.00 Assets:Cash >>>1 -08-Jan-01 January 100 $10.00 $10.00 -08-Jan-01 January 100 $-10.00 0 -08-Jan-31 End of January 101 $10.00 $10.00 -08-Jan-31 End of January 101 $-10.00 0 -08-Feb-01 February 102 $20.00 $20.00 -08-Feb-01 February 102 $-20.00 0 -08-Feb-28 End of February 103 $20.00 $20.00 -08-Feb-28 End of February 103 $-20.00 0 -08-Mar-01 March $30.00 $30.00 -08-Mar-01 March $-30.00 0 +08-Jan-01 January 100:Expenses:Books $10.00 $10.00 +08-Jan-01 January 100:Assets:Cash $-10.00 0 +08-Jan-31 End of January 101:Expenses:Books $10.00 $10.00 +08-Jan-31 End of January 101:Assets:Cash $-10.00 0 +08-Feb-01 February 102:Expenses:Books $20.00 $20.00 +08-Feb-01 February 102:Assets:Cash $-20.00 0 +08-Feb-28 End of February 103:Expenses:Books $20.00 $20.00 +08-Feb-28 End of February 103:Assets:Cash $-20.00 0 +08-Mar-01 March Expenses:Books $30.00 $30.00 +08-Mar-01 March Assets:Cash $-30.00 0 >>>2 === 0 diff --git a/test/baseline/opt-commodity-as-account.test b/test/baseline/opt-commodity-as-account.test index 44fb0028..2e723347 100644 --- a/test/baseline/opt-commodity-as-account.test +++ b/test/baseline/opt-commodity-as-account.test @@ -4,8 +4,8 @@ reg --account=commodity Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00 Income:Dividends:Vanguard:VMMXX $-0.35 >>>1 -07-Feb-02 RD VMMXX VMMXX 0.350 VMMXX 0.350 VMMXX -07-Feb-02 RD VMMXX $ $-0.35 $-0.35 +07-Feb-02 RD VMMXX VM:As:In:Va:VMMXX 0.350 VMMXX 0.350 VMMXX +07-Feb-02 RD VMMXX $:In:Di:Vanguard:VMMXX $-0.35 $-0.35 0.350 VMMXX >>>2 === 0 diff --git a/test/baseline/opt-payee-as-account.test b/test/baseline/opt-payee-as-account.test index a9c95b2c..6aca0dab 100644 --- a/test/baseline/opt-payee-as-account.test +++ b/test/baseline/opt-payee-as-account.test @@ -20,15 +20,15 @@ reg --account=payee Expenses:Books $30.00 Assets:Cash >>>1 -08-Jan-01 January January $10.00 $10.00 -08-Jan-01 January January $-10.00 0 -08-Jan-31 End of January End of January $10.00 $10.00 -08-Jan-31 End of January End of January $-10.00 0 -08-Feb-01 February February $20.00 $20.00 -08-Feb-01 February February $-20.00 0 -08-Feb-28 End of February End of February $20.00 $20.00 -08-Feb-28 End of February End of February $-20.00 0 -08-Mar-01 March March $30.00 $30.00 -08-Mar-01 March March $-30.00 0 +08-Jan-01 January January:Expenses:Books $10.00 $10.00 +08-Jan-01 January January:Assets:Cash $-10.00 0 +08-Jan-31 End of January En:Expenses:Books $10.00 $10.00 +08-Jan-31 End of January En:Assets:Cash $-10.00 0 +08-Feb-01 February Fe:Expenses:Books $20.00 $20.00 +08-Feb-01 February February:Assets:Cash $-20.00 0 +08-Feb-28 End of February En:Expenses:Books $20.00 $20.00 +08-Feb-28 End of February En:Assets:Cash $-20.00 0 +08-Mar-01 March March:Expenses:Books $30.00 $30.00 +08-Mar-01 March March:Assets:Cash $-30.00 0 >>>2 === 0 diff --git a/test/baseline/opt-pricedb-format.test b/test/baseline/opt-pricedb-format.test index 5dbff609..e2c26f5f 100644 --- a/test/baseline/opt-pricedb-format.test +++ b/test/baseline/opt-pricedb-format.test @@ -1,5 +1,7 @@ pricedb --pricedb-format='P %(date) %(scrub(display_amount))\n' <<< +D $1,000.00 + P 2009/01/01 13:30:00 AAPL $10.00 P 2009/01/01 14:30:00 AAPL $20.00 P 2009/01/01 15:30:00 AAPL $30.00 diff --git a/test/baseline/opt-prices-format.test b/test/baseline/opt-prices-format.test index f8033c59..8a83ad5f 100644 --- a/test/baseline/opt-prices-format.test +++ b/test/baseline/opt-prices-format.test @@ -1,5 +1,7 @@ prices --prices-format='%(datetime) %(scrub(display_amount))\n' <<< +D $1,000.00 + P 2009/01/01 13:30:00 AAPL $10.00 P 2009/01/01 14:30:00 AAPL $20.00 P 2009/01/01 15:30:00 AAPL $30.00 diff --git a/test/baseline/opt-unrealized-gains.test b/test/baseline/opt-unrealized-gains.test new file mode 100644 index 00000000..5b225a42 --- /dev/null +++ b/test/baseline/opt-unrealized-gains.test @@ -0,0 +1,20 @@ +bal -V --unrealized --unrealized-gains G +<<< +2008/10/01 Sample + Assets:Brokerage 10 AAPL + Assets:Checking $-200.00 + +P 2008/10/20 12:00:00 AAPL $30.00 + +; 2008/10/20 <Generated Transaction> +; Assets:Brokerage $100 +; Equity:Unrealized Gains +>>>1 + $100.00 Assets + $300.00 Brokerage + $-200.00 Checking + $-100.00 G +-------------------- + 0 +>>>2 +=== 0 diff --git a/test/baseline/opt-unrealized-losses.test b/test/baseline/opt-unrealized-losses.test new file mode 100644 index 00000000..2edd4e63 --- /dev/null +++ b/test/baseline/opt-unrealized-losses.test @@ -0,0 +1,20 @@ +bal -V --unrealized --unrealized-losses L +<<< +2008/10/01 Sample + Assets:Brokerage 10 AAPL + Assets:Checking $-200.00 + +P 2008/10/20 12:00:00 AAPL $10.00 + +; 2008/10/20 <Generated Transaction> +; Assets:Brokerage $100 +; Equity:Unrealized Gains +>>>1 + $-100.00 Assets + $100.00 Brokerage + $-200.00 Checking + $100.00 L +-------------------- + 0 +>>>2 +=== 0 diff --git a/test/baseline/opt-unrealized.test b/test/baseline/opt-unrealized.test index 7d5d20fb..c472d9ef 100644 --- a/test/baseline/opt-unrealized.test +++ b/test/baseline/opt-unrealized.test @@ -18,3 +18,31 @@ P 2008/10/20 12:00:00 AAPL $30.00 0 >>>2 === 0 +bal -V --unrealized --now=2009/11/25 +<<< +2008/10/01 Sample + Assets:Brokerage 10 AAPL + Assets:Checking $-200.00 + +2008/10/01 Sample + Assets:Brokerage -10 QQQQ + Assets:Checking $1000 + +P 2008/10/20 12:00:00 AAPL $30.00 +P 2008/10/20 12:00:00 QQQQ $110 + +; 2008/10/20 <Generated Transaction> +; Assets:Brokerage $100 +; Equity:Unrealized Gains + +; 2008/10/20 <Generated Transaction> +; Assets:Brokerage $-100 +; Equity:Unrealized Losses +>>>1 + 0 Assets + $-800.00 Brokerage + $800.00 Checking +-------------------- + 0 +>>>2 +=== 0 diff --git a/test/baseline/test-sample.dat b/test/baseline/test-sample.dat new file mode 100644 index 00000000..4bfbe1e2 --- /dev/null +++ b/test/baseline/test-sample.dat @@ -0,0 +1,91 @@ +reg +<<< +; -*- ledger -*- + +N $ + += /^Expenses:Books/ + (Liabilities:Taxes) -0.10 + +~ Monthly + Assets:Bank:Checking $500.00 + Income:Salary + +~ Yearly + Expenses:Donations $100.00 + Assets:Bank:Checking + +2004/05/01 * Checking balance + Assets:Bank:Checking $1,000.00 + Equity:Opening Balances + +2004/05/03=2004/05/01 * Investment balance + Assets:Brokerage 50 AAPL @ $30.00 + Equity:Opening Balances + +2004/05/14 * Páy dày + Assets:Bank:Checking 500.00€ + Income:Salary + +2004/05/14 * Another dày in which there is Páying + Asséts:Bánk:Chécking:Asséts:Bánk:Chécking $500.00 + Income:Salary + +2004/05/14 * Another dày in which there is Páying + Русский язык:Активы:Русский язык:Русский язык $1000.00 + Income:Salary + +tag foo + +2004/05/27 Book Store + Expenses:Books $20.00 + Expenses:Cards $40.00 + Expenses:Docs $30.00 + Liabilities:MasterCard + +end tag + +2004/05/27 (100) Credit card company + ; This is an xact note! + ; Sample: Value + Liabilities:MasterCard $20.00 + ; This is a posting note! + ; Sample: Another Value + ; :MyTag: + Assets:Bank:Checking + ; :AnotherTag: +>>>1 +04-May-01 Checking balance Assets:Bank:Checking $1,000.00 $1,000.00 + Eq:Opening Balances $-1,000.00 0 +04-May-03 Investment balance Assets:Brokerage 50 AAPL 50 AAPL + Eq:Opening Balances $-1,500.00 $-1,500.00 + 50 AAPL +04-May-14 Páy dày Assets:Bank:Checking 500.00€ $-1,500.00 + 50 AAPL + 500.00€ + Income:Salary -500.00€ $-1,500.00 + 50 AAPL +04-May-14 Another dày in whic.. ..Bá:Ch:As:Bá:Chécking $500.00 $-1,000.00 + 50 AAPL + Income:Salary $-500.00 $-1,500.00 + 50 AAPL +04-May-14 Another dày in whic.. Ру:Ак:Ру:Русский язык $1,000.00 $-500.00 + 50 AAPL + Income:Salary $-1,000.00 $-1,500.00 + 50 AAPL +04-May-27 Book Store Expenses:Books $20.00 $-1,480.00 + 50 AAPL + Expenses:Cards $40.00 $-1,440.00 + 50 AAPL + Expenses:Docs $30.00 $-1,410.00 + 50 AAPL + Liabilities:MasterCard $-90.00 $-1,500.00 + 50 AAPL + (Liabilities:Taxes) $-2.00 $-1,502.00 + 50 AAPL +04-May-27 Credit card company Liabilities:MasterCard $20.00 $-1,482.00 + 50 AAPL + Assets:Bank:Checking $-20.00 $-1,502.00 + 50 AAPL +>>>2 +=== 0 |