From 67f6a20b27c98788843883c3712c648e110d781f 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 18:40:33 +0800 Subject: =?UTF-8?q?=E8=BD=AC=E7=A7=BB=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/implementation/local.lua | 191 +++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 server/test/implementation/local.lua (limited to 'server/test/implementation/local.lua') diff --git a/server/test/implementation/local.lua b/server/test/implementation/local.lua new file mode 100644 index 00000000..7e9b3db0 --- /dev/null +++ b/server/test/implementation/local.lua @@ -0,0 +1,191 @@ +TEST [[ +local + = 1 +]] + +TEST [[ +local z, y, + = 1 +]] + +TEST [[ +local = 1 + = 1 +]] + +TEST [[ +local z, y, = 1 + = 1 +]] + +TEST [[ +local x +local + = 1 +]] + +TEST [[ +local +do + = 1 +end +]] + +TEST [[ +local +do + local x +end + = 1 +]] + +TEST [[ +local +if then + local x +end +]] + +TEST [[ +local +if x2 then + local x2 +elseif then + local x2 +end +]] + +TEST [[ +local +if x then + local x +elseif x then + local x +else + local x +end + = 1 +]] + +TEST [[ +local +if x then + = 1 +elseif x then + local x +else + local x +end +]] + +TEST [[ +local +for x = 1, 10 do +end + = 1 +]] + +TEST [[ +local x +for = 1, 10 do + = 1 +end +]] + +TEST [[ +local +for x in x do +end + = 1 +]] + +TEST [[ +local +for x in do +end +]] + +TEST [[ +local x +for in x do + = 1 +end +]] + +TEST [[ +local x +for z, y, in x do + = 1 +end +]] + +TEST [[ +local +while do +end +]] + +TEST [[ +local +while x do + = 1 +end +]] + +TEST [[ +local +while x do + local x +end + = 1 +]] + +TEST [[ +local +repeat + = 1 +until true +]] + +TEST [[ +local +repeat + local x +until true + = 1 +]] + +TEST [[ +local +repeat +until +]] + +TEST [[ +local x +repeat + local +until +]] + +TEST [[ +local +function _() + local x +end + = 1 +]] + +TEST [[ +local +return function () + = 1 +end +]] + +TEST [[ +local +local x = function () + = 1 +end +]] -- cgit v1.2.3