aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/in_expression.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/outputs/in_expression.lua')
-rw-r--r--spec/outputs/in_expression.lua85
1 files changed, 85 insertions, 0 deletions
diff --git a/spec/outputs/in_expression.lua b/spec/outputs/in_expression.lua
index 8b37a72..41ae87e 100644
--- a/spec/outputs/in_expression.lua
+++ b/spec/outputs/in_expression.lua
@@ -38,4 +38,89 @@ do
38 local _val_0 = y 38 local _val_0 = y
39 return not (a < _val_0 and _val_0 < b) 39 return not (a < _val_0 and _val_0 < b)
40end 40end
41do
42 local exist
43 do
44 local _check_0 = list
45 local _val_0 = item
46 local _find_0 = false
47 for _index_0 = 1, #_check_0 do
48 local _item_0 = _check_0[_index_0]
49 if _item_0 == _val_0 then
50 _find_0 = true
51 break
52 end
53 end
54 exist = _find_0
55 end
56 check((function()
57 local _check_0 = list
58 local _val_0 = item
59 for _index_0 = 1, #_check_0 do
60 if _check_0[_index_0] == _val_0 then
61 return true
62 end
63 end
64 return false
65 end)())
66end
67do
68 local item = get()
69 local exist = (function()
70 local _check_0 = list
71 for _index_0 = 1, #_check_0 do
72 if _check_0[_index_0] == item then
73 return true
74 end
75 end
76 return false
77 end)()
78 check((function()
79 local _check_0 = list
80 for _index_0 = 1, #_check_0 do
81 if _check_0[_index_0] == item then
82 return true
83 end
84 end
85 return false
86 end)())
87end
88do
89 local item = get()
90 local list = {
91 1,
92 2,
93 3
94 }
95 local exist = (#list > 0 and (function()
96 for _index_0 = 1, #list do
97 if list[_index_0] == item then
98 return true
99 end
100 end
101 return false
102 end)())
103 check((#list > 0 and (function()
104 for _index_0 = 1, #list do
105 if list[_index_0] == item then
106 return true
107 end
108 end
109 return false
110 end)()))
111 check((1 == item or 2 == item or 3 == item))
112 check((function()
113 local _check_0 = {
114 [1] = 1,
115 [2] = 2,
116 [3] = 3
117 }
118 for _index_0 = 1, #_check_0 do
119 if _check_0[_index_0] == item then
120 return true
121 end
122 end
123 return false
124 end)())
125end
41return nil 126return nil