diff options
author | John Wiegley <johnw@newartisans.com> | 2012-04-26 16:39:25 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-04-26 16:39:25 -0500 |
commit | 64a9b42381c26baf24e58b40f50f0b253e551811 (patch) | |
tree | 5447a29dff64c3a8b7be8100a01bcb4a2d73b0bb /test/baseline/cmd-select.test | |
parent | 7cc550fc22357e2ded194d3e65287c6b3317f5ae (diff) | |
parent | b4407c10c0071365322b2963747bf42a57fd7304 (diff) | |
download | fork-ledger-64a9b42381c26baf24e58b40f50f0b253e551811.tar.gz fork-ledger-64a9b42381c26baf24e58b40f50f0b253e551811.tar.bz2 fork-ledger-64a9b42381c26baf24e58b40f50f0b253e551811.zip |
Merge branch 'release/v3.0.0-20120426'
Diffstat (limited to 'test/baseline/cmd-select.test')
-rw-r--r-- | test/baseline/cmd-select.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/baseline/cmd-select.test b/test/baseline/cmd-select.test new file mode 100644 index 00000000..c8ce7008 --- /dev/null +++ b/test/baseline/cmd-select.test @@ -0,0 +1,62 @@ +2012-02-28 * Test 1 + E 20.00 EUR + F + +2012-02-29 * Test 2 + Test 10.01 EUR + F + +2012-03-24 Test 3 + C 30.00 EUR + D + +2012-03-25 (test) Test 4 + ; Payee: Test 5 + E 40.00 GBP + F + +test select "date, account, amount" from posts +12-Feb-28 E [0m 20.00 EUR +12-Feb-28 F [0m -20.00 EUR +12-Feb-29 Test [0m 10.01 EUR +12-Feb-29 F [0m -10.01 EUR +12-Mar-24 C [0m 30.00 EUR +12-Mar-24 D [0m -30.00 EUR +12-Mar-25 E [0m 40.00 GBP +12-Mar-25 F [0m -40.00 GBP +end test + +test select "date, account, amount from posts where account =~ /^e/" +12-Feb-28 E [0m 20.00 EUR +12-Mar-25 E [0m 40.00 GBP +end test + +test select "date, account, amount from posts where account =~ /e/" +12-Feb-28 E [0m 20.00 EUR +12-Feb-29 Test [0m 10.01 EUR +12-Mar-25 E [0m 40.00 GBP +end test + +; leave out "from posts" since it is the default +test select "date, account, amount where account =~ /e/" +12-Feb-28 E [0m 20.00 EUR +12-Feb-29 Test [0m 10.01 EUR +12-Mar-25 E [0m 40.00 GBP +end test + +test select "date, payee, amount from posts where account =~ /e/ and commodity =~ /GBP/" +12-Mar-25 Test 5 40.00 GBP +end test + +test select "date, payee, amount * 2 from posts where account =~ /e/ and commodity =~ /GBP/" +12-Mar-25 Test 5 80.00 GBP +end test + +test select "date, code, amount from posts where account =~ /e/ and commodity =~ /GBP/" +12-Mar-25 test 40.00 GBP +end test + +test select "date, code * 2, amount from posts where account =~ /e/ and commodity =~ /GBP/" +12-Mar-25 testtest 40.00 GBP +end test + |