summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/543_a.test26
-rw-r--r--test/regress/543_b.test22
-rw-r--r--test/regress/543_c.test24
-rw-r--r--test/regress/543_d.test32
4 files changed, 104 insertions, 0 deletions
diff --git a/test/regress/543_a.test b/test/regress/543_a.test
new file mode 100644
index 00000000..6359f0e2
--- /dev/null
+++ b/test/regress/543_a.test
@@ -0,0 +1,26 @@
+2018/01/01 * Opening Balance
+ Assets:Checking $100.00
+ Equity:Opening Balances
+
+2018/01/01 * Budget
+ [Assets:Checking] -$100.00
+ [Assets:Budget:Food:Groceries] $20.00
+ [Assets:Budget:Food:Restaurants] $80.00
+
+2018/01/02 * Assertion
+ [Assets:Checking] = $0.00
+
+2018/01/02 * Assertion
+ Assets:Checking = $100.00
+
+test bal Assets
+ $100.00 Assets:Budget:Food
+ $20.00 Groceries
+ $80.00 Restaurants
+--------------------
+ $100.00
+end test
+
+test bal Assets -R
+ $100.00 Assets:Checking
+end test
diff --git a/test/regress/543_b.test b/test/regress/543_b.test
new file mode 100644
index 00000000..1a022ae4
--- /dev/null
+++ b/test/regress/543_b.test
@@ -0,0 +1,22 @@
+2018/01/01 * Opening Balance
+ Assets:Checking $100.00
+ Equity:Opening Balances
+
+2018/01/01 * Budget
+ [Assets:Checking] -$100.00
+ [Assets:Budget:Food:Groceries] $20.00
+ [Assets:Budget:Food:Restaurants] $80.00
+
+2018/01/02 * Buy Groceries
+ [Assets:Budget:Food:Groceries] -$20 = $0
+ [Assets:Checking] $20
+ Assets:Checking -$20 = $80
+ Expenses:Food:Groceries $20
+
+test bal Assets
+ $80.00 Assets:Budget:Food:Restaurants
+end test
+
+test bal Assets -R
+ $80.00 Assets:Checking
+end test
diff --git a/test/regress/543_c.test b/test/regress/543_c.test
new file mode 100644
index 00000000..0e51b119
--- /dev/null
+++ b/test/regress/543_c.test
@@ -0,0 +1,24 @@
+2018/01/01 * Opening Balance
+ Assets:Checking $100.00
+ Equity:Opening Balances
+
+2018/01/01 * Budget
+ [Assets:Checking] -$100.00
+ [Assets:Budget:Food:Groceries] $20.00
+ [Assets:Budget:Food:Restaurants] $80.00
+
+2018/01/02 * Budget Groceries
+ [Assets:Budget:Food:Groceries] -$20 = $0
+ [Assets:Checking] $20
+
+2018/01/02 * Buy Groceries
+ Assets:Checking -$20 = $80
+ Expenses:Food:Groceries $20
+
+test bal Assets
+ $80.00 Assets:Budget:Food:Restaurants
+end test
+
+test bal Assets -R
+ $80.00 Assets:Checking
+end test
diff --git a/test/regress/543_d.test b/test/regress/543_d.test
new file mode 100644
index 00000000..3b4e825a
--- /dev/null
+++ b/test/regress/543_d.test
@@ -0,0 +1,32 @@
+2018/01/01 * Opening Balance
+ Assets:Checking $100.00
+ Equity:Opening Balances
+
+2018/01/01 * Budget
+ [Assets:Checking] = 0
+ [Assets:Budget:Food:Groceries] $20.00
+ [Assets:Budget:Food:Restaurants] $80.00
+
+2018/01/02 * Groceries
+ Assets:Checking = $80.00
+ Expenses:Groceries
+
+test bal
+ $80.00 Assets
+ $100.00 Budget:Food
+ $20.00 Groceries
+ $80.00 Restaurants
+ $-20.00 Checking
+ $-100.00 Equity:Opening Balances
+ $20.00 Expenses:Groceries
+--------------------
+ 0
+end test
+
+test bal -R
+ $80.00 Assets:Checking
+ $-100.00 Equity:Opening Balances
+ $20.00 Expenses:Groceries
+--------------------
+ 0
+end test