diff options
Diffstat (limited to 'test/regress')
-rw-r--r-- | test/regress/1038_1.test | 18 | ||||
-rw-r--r-- | test/regress/1038_2.test | 18 | ||||
-rw-r--r-- | test/regress/1038_3.test | 20 | ||||
-rw-r--r-- | test/regress/1072.test | 31 | ||||
-rw-r--r-- | test/regress/1074.test | 161 | ||||
-rw-r--r-- | test/regress/5D92A5EB.test | 2 | ||||
-rw-r--r-- | test/regress/730.test | 37 | ||||
-rw-r--r-- | test/regress/A013A73B.test | 10 |
8 files changed, 296 insertions, 1 deletions
diff --git a/test/regress/1038_1.test b/test/regress/1038_1.test new file mode 100644 index 00000000..c833816e --- /dev/null +++ b/test/regress/1038_1.test @@ -0,0 +1,18 @@ +Y2014 + +04/13 Bank + Expenses:Loan $400 + Assets:Cash + +05/13 Bug 1038 Test + Expenses:Some:Account $500 + Assets:Cash + +06/13 Landlord + Expenses:Rent $600 + Assets:Cash + +test reg --now 2014-05-14 -p 'this month' +14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500 + Assets:Cash $-500 0 +end test diff --git a/test/regress/1038_2.test b/test/regress/1038_2.test new file mode 100644 index 00000000..ce0c046d --- /dev/null +++ b/test/regress/1038_2.test @@ -0,0 +1,18 @@ +year 2014 + +04/13 Bank + Expenses:Loan $400 + Assets:Cash + +05/13 Bug 1038 Test + Expenses:Some:Account $500 + Assets:Cash + +06/13 Landlord + Expenses:Rent $600 + Assets:Cash + +test reg --now 2014-05-14 -p 'this month' +14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500 + Assets:Cash $-500 0 +end test diff --git a/test/regress/1038_3.test b/test/regress/1038_3.test new file mode 100644 index 00000000..0e277d71 --- /dev/null +++ b/test/regress/1038_3.test @@ -0,0 +1,20 @@ +apply year 2014 + +04/13 Bank + Expenses:Loan $400 + Assets:Cash + +05/13 Bug 1038 Test + Expenses:Some:Account $500 + Assets:Cash + +06/13 Landlord + Expenses:Rent $600 + Assets:Cash + +end apply + +test reg --now 2014-05-14 -p 'this month' +14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500 + Assets:Cash $-500 0 +end test diff --git a/test/regress/1072.test b/test/regress/1072.test new file mode 100644 index 00000000..3f58b83f --- /dev/null +++ b/test/regress/1072.test @@ -0,0 +1,31 @@ + +--input-date-format %d/%m/%y +--date-format %d/%m/%y + +1/1/14 * Test + A $10 + B + +12/1/14 * Test + A $20 + B + +test --input-date-format %d/%m/%y reg --begin 2/1/13 +01/01/14 Test A $10 $10 + B $-10 0 +12/01/14 Test A $20 $20 + B $-20 0 +end test + +test --input-date-format %d/%m/%y reg --begin 1/1/14 +01/01/14 Test A $10 $10 + B $-10 0 +12/01/14 Test A $20 $20 + B $-20 0 +end test + +test --input-date-format %d/%m/%y reg --begin 2/1/14 +12/01/14 Test A $20 $20 + B $-20 0 +end test + diff --git a/test/regress/1074.test b/test/regress/1074.test new file mode 100644 index 00000000..1aaf0ca0 --- /dev/null +++ b/test/regress/1074.test @@ -0,0 +1,161 @@ + +--input-date-format %Y-%m-%d +--date-format %Y-%m-%d + +2011-06-01 * Jun 2011 + A $10 + B + +2011-07-01 * Jul 2011 + A $10 + B + +2011-08-01 * Aug 2011 + A $10 + B + +2012-06-01 * Jun 2012 + A $10 + B + +2012-07-01 * Jul 2012 + A $10 + B + +2012-08-01 * Aug 2012 + A $10 + B + +2013-06-01 * Jun 2013 + A $10 + B + +2013-07-01 * Jul 2013 + A $10 + B + +2013-08-01 * Aug 2013 + A $10 + B + +2014-06-01 * Jun 2014 + A $10 + B + +2014-07-01 * Jul 2014 + A $10 + B + +2014-08-01 * Aug 2014 + A $10 + B + +2015-06-01 * Jun 2015 + A $10 + B + +2015-07-01 * Jul 2015 + A $10 + B + +2015-08-01 * Aug 2015 + A $10 + B + +test --now 2012-02-03 reg -p "from june to july" +2012-06-01 Jun 2012 A $10 $10 + B $-10 0 +end test + +test --now 2013-02-03 reg -p "from june to july" +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +end test + +test --now 2014-02-03 reg -p "from june to july" +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2014-10-02 reg -p "from june to july" +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2012-02-03 reg -p "from june to july 2014" +2012-06-01 Jun 2012 A $10 $10 + B $-10 0 +2012-07-01 Jul 2012 A $10 $10 + B $-10 0 +2012-08-01 Aug 2012 A $10 $10 + B $-10 0 +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +2013-07-01 Jul 2013 A $10 $10 + B $-10 0 +2013-08-01 Aug 2013 A $10 $10 + B $-10 0 +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2013-10-02 reg -p "from june to july 2014" +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +2013-07-01 Jul 2013 A $10 $10 + B $-10 0 +2013-08-01 Aug 2013 A $10 $10 + B $-10 0 +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2014-01-02 reg -p "from june to july 2014" +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2014-10-02 reg -p "from june to july 2014" +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2012-02-03 reg -p "from june 2012 to july 2014" +2012-06-01 Jun 2012 A $10 $10 + B $-10 0 +2012-07-01 Jul 2012 A $10 $10 + B $-10 0 +2012-08-01 Aug 2012 A $10 $10 + B $-10 0 +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +2013-07-01 Jul 2013 A $10 $10 + B $-10 0 +2013-08-01 Aug 2013 A $10 $10 + B $-10 0 +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2012-02-03 reg -p "from june 2013 to july 2014" +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +2013-07-01 Jul 2013 A $10 $10 + B $-10 0 +2013-08-01 Aug 2013 A $10 $10 + B $-10 0 +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + +test --now 2015-02-03 reg -p "from june 2013 to july 2014" +2013-06-01 Jun 2013 A $10 $10 + B $-10 0 +2013-07-01 Jul 2013 A $10 $10 + B $-10 0 +2013-08-01 Aug 2013 A $10 $10 + B $-10 0 +2014-06-01 Jun 2014 A $10 $10 + B $-10 0 +end test + diff --git a/test/regress/5D92A5EB.test b/test/regress/5D92A5EB.test index 6d29eda6..57fcadb3 100644 --- a/test/regress/5D92A5EB.test +++ b/test/regress/5D92A5EB.test @@ -29,6 +29,6 @@ While parsing periodic transaction: > Liabilities:Education:ULL $100.00 > Liabilities:Mortgage $100.00 > Assets:Bank:Checking -Error: Posting with null amount's account may be mispelled: +Error: Posting with null amount's account may be misspelled: "Expenses:Entertainment:Blizzard $100.00" end test diff --git a/test/regress/730.test b/test/regress/730.test new file mode 100644 index 00000000..d81a1c22 --- /dev/null +++ b/test/regress/730.test @@ -0,0 +1,37 @@ +; Using -M in combination with an empty result causes a segmentation fault +; therefore this test case does not have or need any test data + +test -f /dev/null -M reg +end test + +; Tests mentioned in #730 +test reg -M +end test + +test reg -M .foo +end test + +test reg -M -e 2012/01 +end test + + +; Tests mentioned in #1080 +test reg '^Expenses' and expr 'any(account =~ /^Assets:Cash/)' --period 'every week this month' +end test + +test bal '^Expenses' and expr 'any(account =~ /^Assets:Cash/)' --period 'every week this month' +end test + +test bal reg foo and expr 'any(account =~ /bar/)' --period 'every week' +end test + + +; Tests mentioned in #1084 +test b abc -M +end test + +test reg foo -M +end test + +test bal foo -M +end test diff --git a/test/regress/A013A73B.test b/test/regress/A013A73B.test new file mode 100644 index 00000000..251277ea --- /dev/null +++ b/test/regress/A013A73B.test @@ -0,0 +1,10 @@ + +2014-01-01 c ; x + a 1 + b + +test reg +14-Jan-01 c a 1 1 + b -1 0 +end test + |