OILS / spec / ysh-keywords.test.sh View on Github | oilshell.org

37 lines, 22 significant
1## our_shell: ysh
2
3#### = to pretty print
4= 1 + 2 * 3
5## STDOUT:
6(Int) 7
7## END
8
9#### 'call' to ignore return value
10call 1 + 2 * 3
11
12var strs = %(a b)
13call len(strs)
14call strs->append('c')
15write -- @strs
16
17# integer types too
18const L = [5, 6]
19call L->append(7)
20write -- @L
21
22write __
23
24call L->pop()
25write -- @L
26
27## STDOUT:
28a
29b
30c
315
326
337
34__
355
366
37## END