<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Sergey,</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 21.08.2024 11:58, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:46e696274dfe466c47e0ee998c03e1278f17ce72.1724228998.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">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
---</pre>
</blockquote>
thanks for the patch! LGTM
<blockquote type="cite"
cite="mid:46e696274dfe466c47e0ee998c03e1278f17ce72.1724228998.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">
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)
-]]))()
-
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>