diff options
Diffstat (limited to 'spec/outputs/cond.lua')
-rw-r--r-- | spec/outputs/cond.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/outputs/cond.lua b/spec/outputs/cond.lua index 1f6aa63..651c14a 100644 --- a/spec/outputs/cond.lua +++ b/spec/outputs/cond.lua | |||
@@ -345,4 +345,21 @@ do | |||
345 | v = 2 | 345 | v = 2 |
346 | end | 346 | end |
347 | end | 347 | end |
348 | do | ||
349 | local condChain = 1 < 2 and 2 <= 2 and 2 < 3 and 3 == 3 and 3 > 2 and 2 >= 1 and 1 == 1 and 1 < 3 and 3 ~= 5 | ||
350 | local v | ||
351 | v = function(x) | ||
352 | print(x) | ||
353 | return x | ||
354 | end | ||
355 | local evaluation | ||
356 | do | ||
357 | local _cond_0 = v(2) | ||
358 | evaluation = v(1) < _cond_0 and _cond_0 <= v(3) | ||
359 | end | ||
360 | do | ||
361 | local _cond_0 = v(2) | ||
362 | evaluation = v(1) > _cond_0 and _cond_0 <= v(3) | ||
363 | end | ||
364 | end | ||
348 | return nil | 365 | return nil |