From 742544183f0b20856eef6a8a3c0302f3fa12ec0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 20 Nov 2018 14:11:15 +0800 Subject: =?UTF-8?q?=E8=BD=AC=E5=88=B0=E5=AE=9E=E7=8E=B0=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=8C=9C=E6=B5=8B=E9=80=BB=E8=BE=91=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/implementation/if.lua | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) (limited to 'test/implementation') diff --git a/test/implementation/if.lua b/test/implementation/if.lua index 0c7eefc8..a9ab8b22 100644 --- a/test/implementation/if.lua +++ b/test/implementation/if.lua @@ -6,3 +6,79 @@ else = 1 end ]] + +TEST [[ + = 1 +if 1 then + = 1 +else + = 1 +end + = 1 +]] + +TEST [[ + = 1 +if 1 then + = 1 +elseif 1 then + = 1 +else + = 1 +end + = 1 +]] + +TEST [[ + = 1 +if 1 then + = 1 +elseif 1 then + = 1 + if 1 then + = 1 + end +else + = 1 +end + = 1 +]] + +TEST [[ + = 1 +while true do + = 1 +end + = 1 +]] + +TEST [[ + = 1 +for _ in _ do + = 1 +end + = 1 +]] + +TEST [[ + = 1 +for _ = 1, 1 do + = 1 +end + = 1 +]] + +TEST [[ +x = 1 +repeat + = 1 +until == 1 +]] + +TEST [[ + = 1 +repeat + = 1 +until 1 + = 1 +]] -- cgit v1.2.3