From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 7C4D4C6E784; Thu, 22 Aug 2024 16:31:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7C4D4C6E784 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724333477; bh=vnk4L1it3+60fKXNTJT1ePN/+32HoJjGJG2MDxMlb7k=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=xKhrXgS6zs+VCPijgn3VTmBj09SKzC57QBgqUqgsY4r0CO92sATwcDzDKHOtxtYeS XDHIMMqhBt1wjmTvyNAt7y3sLa8X2D5WpSVgLvHSlnYevzhrQF2qJ2nWC3KYJgTtcx rFPL279E3OtRr2KgBvfDyakl3JFE9WlFk2QlUzHU= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [95.163.41.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6BC85C6E785 for ; Thu, 22 Aug 2024 16:31:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6BC85C6E785 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1sh7uF-0000000A1Ae-2VCT; Thu, 22 Aug 2024 16:31:15 +0300 Content-Type: multipart/alternative; boundary="------------UdBe78J5pTT0iotV13x0OGsl" Message-ID: <5a139b42-d1fd-4bb9-b29e-5f410930e4ee@tarantool.org> Date: Thu, 22 Aug 2024 16:31:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <46e696274dfe466c47e0ee998c03e1278f17ce72.1724228998.git.skaplun@tarantool.org> In-Reply-To: <46e696274dfe466c47e0ee998c03e1278f17ce72.1724228998.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9BB2AFC06FD50F0EF8285F8531C8D2DAFB4BBD33CD888F9FD182A05F538085040A5465298F8FF07B9C591814E25D11F9F1A21E778E3119FA88C8D5969F79C319E88EE2A1A7F2CFE66 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76D34FAA3D8B31588C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE74E9055D3307A84CAEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B043BF0FB74779F36C01E7CB06F3B71C7DFEBA3505EA5829B3160A1692CD64E0FA471835C12D1D9774AD6D5ED66289B5259CC434672EE6371117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE7D36F53DD076E3CB7D32BA5DBAC0009BE395957E7521B51C2330BD67F2E7D9AF1090A508E0FED6299176DF2183F8FC7C0E3E3FB6EC827F0A0CD04E86FAF290E2DB606B96278B59C421DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6F82A78844E5C6993089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A535E91099F72795755002B1117B3ED696253B954AA5847843484B8D70797403F6823CB91A9FED034534781492E4B8EEAD85CCBA673D36D1A4BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFC51D372BCBD0A184C676CBDAABB13F6151C3A6AF277F58A0226F9784D0AAB2AF9FED342E2040E9942FB0CAD32ADFBF846231FD08617C0090524C8FFB8DCAFC12666AA96AECAFA1325F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbUwDRTee1XqiIXNwRcvR+w== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D61406491A35CD89994C84836461A60A533252C77E1553853971C0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 25/45] test: enable LuaJIT test X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------UdBe78J5pTT0iotV13x0OGsl Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sergey, On 21.08.2024 11:58, Sergey Kaplun wrote: > This patch moves the aforementioned test from the to the > directory, includes it in , names the subtests, and adds checks > for the Lua version. > > Part of tarantool/tarantool#9398 > --- thanks for the patch! LGTM > test/LuaJIT-tests/lang/index | 1 + > test/LuaJIT-tests/lang/parse_misc.lua | 31 +++++++++++++++++++++++++++ > test/LuaJIT-tests/misc/parse_misc.lua | 31 --------------------------- > 3 files changed, 32 insertions(+), 31 deletions(-) > create mode 100644 test/LuaJIT-tests/lang/parse_misc.lua > delete mode 100644 test/LuaJIT-tests/misc/parse_misc.lua > > diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index > index 0d1175a8..726c8d16 100644 > --- a/test/LuaJIT-tests/lang/index > +++ b/test/LuaJIT-tests/lang/index > @@ -19,6 +19,7 @@ self.lua > table.lua > parse_comp.lua > parse_esc.lua > +parse_misc.lua > upvalue > tail_recursion.lua > vararg_jit.lua > diff --git a/test/LuaJIT-tests/lang/parse_misc.lua b/test/LuaJIT-tests/lang/parse_misc.lua > new file mode 100644 > index 00000000..c95758a3 > --- /dev/null > +++ b/test/LuaJIT-tests/lang/parse_misc.lua > @@ -0,0 +1,31 @@ > +do --- Ambiguous syntax: function call vs. new statement. +lua==5.2 > + assert(assert(loadstring([[ > + local function f() return 99 end > + return f > + () > + ]]))() == 99) > +end > + > +do --- Ambiguous syntax: function call vs. new statement. +lua<5.2 > + assert(loadstring([[ > + local function f() return 99 end > + return f > + () > + ]]) == nil) > +end > + > +do --- UTF-8 identifiers. > + assert(loadstring([[ > + local ä = 1 > + local aäa = 2 > + local äöü·€晶 = 3 > + > + assert(ä == 1) > + assert(aäa == 2) > + assert(äöü·€晶 == 3) > + > + assert(#"ä" == 2) > + assert(#"aäa" == 4) > + assert(#"äöü·€晶" == 14) > + ]]))() > +end > diff --git a/test/LuaJIT-tests/misc/parse_misc.lua b/test/LuaJIT-tests/misc/parse_misc.lua > deleted file mode 100644 > index 8031ec17..00000000 > --- a/test/LuaJIT-tests/misc/parse_misc.lua > +++ /dev/null > @@ -1,31 +0,0 @@ > - > --- Ambiguous syntax: function call vs. new statement. > -if os.getenv("LUA52") then > - assert(assert(loadstring([[ > -local function f() return 99 end > -return f > -() > -]]))() == 99) > -else > - assert(loadstring([[ > -local function f() return 99 end > -return f > -() > -]]) == nil) > -end > - > --- UTF-8 identifiers. > -assert(loadstring([[ > -local ä = 1 > -local aäa = 2 > -local äöü·€晶 = 3 > - > -assert(ä == 1) > -assert(aäa == 2) > -assert(äöü·€晶 == 3) > - > -assert(#"ä" == 2) > -assert(#"aäa" == 4) > -assert(#"äöü·€晶" == 14) > -]]))() > - --------------UdBe78J5pTT0iotV13x0OGsl Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Sergey,


On 21.08.2024 11:58, Sergey Kaplun wrote:
This patch moves the aforementioned test from the <misc> to the <lang/>
directory, includes it in <index>, names the subtests, and adds checks
for the Lua version.

Part of tarantool/tarantool#9398
---
thanks for the patch! LGTM
 test/LuaJIT-tests/lang/index          |  1 +
 test/LuaJIT-tests/lang/parse_misc.lua | 31 +++++++++++++++++++++++++++
 test/LuaJIT-tests/misc/parse_misc.lua | 31 ---------------------------
 3 files changed, 32 insertions(+), 31 deletions(-)
 create mode 100644 test/LuaJIT-tests/lang/parse_misc.lua
 delete mode 100644 test/LuaJIT-tests/misc/parse_misc.lua

diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
index 0d1175a8..726c8d16 100644
--- a/test/LuaJIT-tests/lang/index
+++ b/test/LuaJIT-tests/lang/index
@@ -19,6 +19,7 @@ self.lua
 table.lua
 parse_comp.lua
 parse_esc.lua
+parse_misc.lua
 upvalue
 tail_recursion.lua
 vararg_jit.lua
diff --git a/test/LuaJIT-tests/lang/parse_misc.lua b/test/LuaJIT-tests/lang/parse_misc.lua
new file mode 100644
index 00000000..c95758a3
--- /dev/null
+++ b/test/LuaJIT-tests/lang/parse_misc.lua
@@ -0,0 +1,31 @@
+do --- Ambiguous syntax: function call vs. new statement. +lua==5.2
+  assert(assert(loadstring([[
+    local function f() return 99 end
+    return f
+    ()
+  ]]))() == 99)
+end
+
+do --- Ambiguous syntax: function call vs. new statement. +lua<5.2
+  assert(loadstring([[
+    local function f() return 99 end
+    return f
+    ()
+  ]]) == nil)
+end
+
+do --- UTF-8 identifiers.
+  assert(loadstring([[
+  local ä = 1
+  local aäa = 2
+  local äöü·€晶 = 3
+
+  assert(ä == 1)
+  assert(aäa == 2)
+  assert(äöü·€晶 == 3)
+
+  assert(#"ä" == 2)
+  assert(#"aäa" == 4)
+  assert(#"äöü·€晶" == 14)
+  ]]))()
+end
diff --git a/test/LuaJIT-tests/misc/parse_misc.lua b/test/LuaJIT-tests/misc/parse_misc.lua
deleted file mode 100644
index 8031ec17..00000000
--- a/test/LuaJIT-tests/misc/parse_misc.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-
--- Ambiguous syntax: function call vs. new statement.
-if os.getenv("LUA52") then
-  assert(assert(loadstring([[
-local function f() return 99 end
-return f
-()
-]]))() == 99)
-else
-  assert(loadstring([[
-local function f() return 99 end
-return f
-()
-]]) == nil)
-end
-
--- UTF-8 identifiers.
-assert(loadstring([[
-local ä = 1
-local aäa = 2
-local äöü·€晶 = 3
-
-assert(ä == 1)
-assert(aäa == 2)
-assert(äöü·€晶 == 3)
-
-assert(#"ä" == 2)
-assert(#"aäa" == 4)
-assert(#"äöü·€晶" == 14)
-]]))()
-
--------------UdBe78J5pTT0iotV13x0OGsl--