File: cmd-script.test

package info (click to toggle)
ledger 3.1.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,464 kB
  • sloc: cpp: 37,495; python: 4,279; perl: 1,319; sh: 475; lisp: 436; makefile: 134; cs: 118; yacc: 103
file content (21 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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