summaryrefslogtreecommitdiff
path: root/test/regress/1895.test
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2020-05-18 13:05:53 +0800
committerMartin Michlmayr <tbm@cyrius.com>2020-05-18 13:06:43 +0800
commit12e5106beba7dc967049fd11fb09b85485535919 (patch)
tree114977f5c15c95236c6b2d5fa9331f2bc9b62a2f /test/regress/1895.test
parent1600ee1f64f659b151c1c873d478baa1bdab89f2 (diff)
downloadfork-ledger-12e5106beba7dc967049fd11fb09b85485535919.tar.gz
fork-ledger-12e5106beba7dc967049fd11fb09b85485535919.tar.bz2
fork-ledger-12e5106beba7dc967049fd11fb09b85485535919.zip
Add regression test for issue #1895
Thanks to Feiko Nanninga for the test case.
Diffstat (limited to 'test/regress/1895.test')
-rw-r--r--test/regress/1895.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/regress/1895.test b/test/regress/1895.test
new file mode 100644
index 00000000..5cf63269
--- /dev/null
+++ b/test/regress/1895.test
@@ -0,0 +1,31 @@
+
+2020-05-18 Test
+ Assets:foo 10.00 EUR
+ Assets:bar -10.00 EUR
+
+test bal
+ 0 Assets
+ -10.00 EUR bar
+ 10.00 EUR foo
+--------------------
+ 0
+end test
+
+test bal --invert
+ 0 Assets
+ 10.00 EUR bar
+ -10.00 EUR foo
+--------------------
+ 0
+end test
+
+test reg --format="%(account) %10(amount) %10(amount_expr) %10(total) %10(display_amount) %10(display_total)\n"
+Assets:foo 10.00 EUR 10.00 EUR 10.00 EUR 10.00 EUR 10.00 EUR
+Assets:bar -10.00 EUR -10.00 EUR 0 -10.00 EUR 0
+end test
+
+test reg --format="%(account) %10(amount) %10(amount_expr) %10(total) %10(display_amount) %10(display_total)\n" --invert
+Assets:foo 10.00 EUR -10.00 EUR -10.00 EUR -10.00 EUR -10.00 EUR
+Assets:bar -10.00 EUR 10.00 EUR 0 10.00 EUR 0
+end test
+