diff options
Diffstat (limited to 'test/regress')
-rw-r--r-- | test/regress/1055.test | 26 | ||||
-rw-r--r-- | test/regress/1132.test | 16 | ||||
-rw-r--r-- | test/regress/550-584.test | 73 |
3 files changed, 115 insertions, 0 deletions
diff --git a/test/regress/1055.test b/test/regress/1055.test new file mode 100644 index 00000000..e3e997fa --- /dev/null +++ b/test/regress/1055.test @@ -0,0 +1,26 @@ +2011-01-01 * Opening balance + Assets:Broker 250.00 GBP = 250.00 GBP + Equity:Opening balance -250.00 GBP + +2011-02-01 * Buy 1 AAA for 10.00 GBP + Assets:Broker 1 AAA = 1 AAA + Assets:Broker -10.00 GBP + +2011-03-01 * Buy 1 AAA for 10.00 GBP + Assets:Broker 1 AAA = 2 AAA + Assets:Broker -10.00 GBP + +2011-04-01 * Buy 1 BBB for 15.00 GBP + Assets:Broker 1 BBB = 1 BBB + Assets:Broker -15.00 GBP + +test bal + 2 AAA + 1 BBB + 215.00 GBP Assets:Broker + -250.00 GBP Equity:Opening balance +-------------------- + 2 AAA + 1 BBB + -35.00 GBP +end test diff --git a/test/regress/1132.test b/test/regress/1132.test new file mode 100644 index 00000000..d912ddcf --- /dev/null +++ b/test/regress/1132.test @@ -0,0 +1,16 @@ +1994/09/02=1994/08/25 * Joe + Actif:Courant:BnpCc 126,00 F + Actif:Remboursement:Autre -126,00 F = 0,00 F + +1994/10/20=1994/08/25 * (3551465) Bill + Actif:Remboursement:Autre 126,00 F + Actif:Courant:BnpCc + +test bal -> 1 +__ERROR__ +While parsing file "$FILE", line 3: +While parsing posting: + Actif:Remboursement:Autre -126,00 F = 0,00 F + ^^^^^^ +Error: Balance assertion off by 126,00 F (expected to see -126,00 F) +end test diff --git a/test/regress/550-584.test b/test/regress/550-584.test new file mode 100644 index 00000000..1c3be3b8 --- /dev/null +++ b/test/regress/550-584.test @@ -0,0 +1,73 @@ +; this file contains spaces after the payee and tag values. Ledger +; should ignore the trailing spaces for the purposes of determining +; unique values +; +; bug 584 and 550 reported trailing spaces being considered +; significant in payee and tag values. +; +; running +; ledger -f test/spaces.dat payees +; yielded two distinct payees, because utils.h/next_element() didn't +; handle a single space followed by a null correctly. +; +; running +; ledger -f test/spaces.dat reg --group-by "tag('test')" +; yielded four groups. + +2011/11/28 * test + ; no space after payee or tag value + Expenses:misc $1 ; test: spaces + Assets:checking + +2011/11/28 * test + ; single space after payee and tag value + Expenses:misc $2 ; test: spaces + Assets:checking + +2011/11/28 test + ; two spaces after payee and tag value + Expenses:misc $4 ; test: spaces + Assets:checking + +2011/11/28 test + ; three spaces after payee and tag value + Expenses:misc $8 ; test: spaces + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has no space after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has one space after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has two spaces after + Expenses:misc 1 COM + Assets:checking + +2011/11/28 testcommodity + ; COM commodity has three spaces after + Expenses:misc 1 COM + Assets:checking + +test payees +test +testcommodity +end test + +test reg --group-by "tag('test')" +spaces +11-Nov-28 test Expenses:misc $1 $1 +11-Nov-28 test Expenses:misc $2 $3 +11-Nov-28 test Expenses:misc $4 $7 +11-Nov-28 test Expenses:misc $8 $15 +end test + +test commodities +$ +COM +end test |