summaryrefslogtreecommitdiff
path: root/test/baseline
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-01 22:20:20 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-01 22:20:20 -0600
commita0c9ab08dccf65259474b5da97e4f5b092741779 (patch)
tree834eba1387510ad8f012091c41b34153fa06fc6e /test/baseline
parent4e377489990e8c11ebe3cc7d7dced90d0fa76202 (diff)
downloadfork-ledger-a0c9ab08dccf65259474b5da97e4f5b092741779.tar.gz
fork-ledger-a0c9ab08dccf65259474b5da97e4f5b092741779.tar.bz2
fork-ledger-a0c9ab08dccf65259474b5da97e4f5b092741779.zip
Added more baseline testing, for valexprs and Python
Diffstat (limited to 'test/baseline')
-rw-r--r--test/baseline/cmd-script.test9
-rw-r--r--test/baseline/cmd-script_2.test3
-rw-r--r--test/baseline/feat-value_py.test23
3 files changed, 32 insertions, 3 deletions
diff --git a/test/baseline/cmd-script.test b/test/baseline/cmd-script.test
index ed665dcc..12e9c868 100644
--- a/test/baseline/cmd-script.test
+++ b/test/baseline/cmd-script.test
@@ -1,3 +1,12 @@
test eval 'foo(w, u)=(z=w+u;z*2); (a=1 + 1; foo(10, 15))'
50
end test
+
+test eval 'foo(x, y, z)=print(x, y, z); bar(x)=x; foo(1, 2, 3); bar(3)'
+123
+3
+end test
+
+test eval 'total_expr=$100;amount_expr=$15;x=total_expr;x=x/5;x=amount_expr-x*5;x'
+$-85
+end test
diff --git a/test/baseline/cmd-script_2.test b/test/baseline/cmd-script_2.test
deleted file mode 100644
index 51ea41fb..00000000
--- a/test/baseline/cmd-script_2.test
+++ /dev/null
@@ -1,3 +0,0 @@
-test eval 'total_expr=$100;amount_expr=$15;x=total_expr;x=x/5;x=amount_expr-x*5;x'
-$-85
-end test
diff --git a/test/baseline/feat-value_py.test b/test/baseline/feat-value_py.test
new file mode 100644
index 00000000..5efe315d
--- /dev/null
+++ b/test/baseline/feat-value_py.test
@@ -0,0 +1,23 @@
+python
+ def print_type(val):
+ print type(val), val
+
+eval print_type(true)
+eval print_type([2010/08/10])
+eval print_type(10)
+eval print_type($10.00)
+eval print_type($10.00 + CAD 30)
+eval print_type("Hello!")
+eval print_type(/Hello!/)
+;eval print_type((1, 2, 3))
+
+test reg
+<type 'bool'> True
+<type 'datetime.date'> 2010-08-10
+<class 'ledger.Amount'> 10
+<class 'ledger.Amount'> $10.00
+<class 'ledger.Balance'> $10.00
+CAD 30
+<type 'unicode'> Hello!
+<class 'ledger.Value'> Hello!
+end test