diff options
author | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
commit | 60a979e224f26117f5be82bfca757a2483cef0fd (patch) | |
tree | 7c6af44f6dcada1f23979b820ba830251997b161 /spec/outputs/assign.lua | |
parent | a19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff) | |
download | yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2 yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip |
fix test.
Diffstat (limited to 'spec/outputs/assign.lua')
-rw-r--r-- | spec/outputs/assign.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/spec/outputs/assign.lua b/spec/outputs/assign.lua new file mode 100644 index 0000000..628f763 --- /dev/null +++ b/spec/outputs/assign.lua | |||
@@ -0,0 +1,44 @@ | |||
1 | local _ | ||
2 | _ = function() | ||
3 | local joop = 2302 | ||
4 | return function(hi) | ||
5 | local d = 100 | ||
6 | hi = 1021 | ||
7 | local a, b, c | ||
8 | a, b, c, d = 1, 2, 3, 4 | ||
9 | local hello | ||
10 | hello[232], (5 + 5)[121], hello, x[99] = 100, 200, 300 | ||
11 | joop = 12 | ||
12 | end | ||
13 | end | ||
14 | local joop = 2345 | ||
15 | local a, b | ||
16 | if hello then | ||
17 | a, b = "hello" | ||
18 | else | ||
19 | a, b = "nothing", "yeah" | ||
20 | end | ||
21 | if hello then | ||
22 | if yeah then | ||
23 | a, b = "one", "two" | ||
24 | else | ||
25 | a, b = "mmhh" | ||
26 | end | ||
27 | else | ||
28 | print("the other") | ||
29 | a, b = "nothing", "yeah" | ||
30 | end | ||
31 | local c, d | ||
32 | if true then | ||
33 | c, d = 1, 2 | ||
34 | end | ||
35 | local x | ||
36 | do | ||
37 | local f = getHandler() | ||
38 | if f then | ||
39 | x = ((function() | ||
40 | f() | ||
41 | return 123 | ||
42 | end)()) | ||
43 | end | ||
44 | end | ||