summaryrefslogtreecommitdiff
path: root/test/baseline/cmd-script.test
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-04-26 16:39:25 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-04-26 16:39:25 -0500
commit64a9b42381c26baf24e58b40f50f0b253e551811 (patch)
tree5447a29dff64c3a8b7be8100a01bcb4a2d73b0bb /test/baseline/cmd-script.test
parent7cc550fc22357e2ded194d3e65287c6b3317f5ae (diff)
parentb4407c10c0071365322b2963747bf42a57fd7304 (diff)
downloadledger-64a9b42381c26baf24e58b40f50f0b253e551811.tar.gz
ledger-64a9b42381c26baf24e58b40f50f0b253e551811.tar.bz2
ledger-64a9b42381c26baf24e58b40f50f0b253e551811.zip
Merge branch 'release/v3.0.0-20120426'
Diffstat (limited to 'test/baseline/cmd-script.test')
-rw-r--r--test/baseline/cmd-script.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/baseline/cmd-script.test b/test/baseline/cmd-script.test
new file mode 100644
index 00000000..b33dd82d
--- /dev/null
+++ b/test/baseline/cmd-script.test
@@ -0,0 +1,21 @@
+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
+
+test eval 'foo = x, y, z -> print(x, y, z); foo(1, 2, 3)'
+123
+1
+end test
+
+test eval 'foo(x,y)=y(1, 2, 3);foo(amount_expr, (s,d,t -> t))'
+3
+end test