[Tarantool-patches] [PATCH v2 luajit 35/45] test: enable <misc/stackovc.lua> LuaJIT test
Sergey Kaplun
skaplun at tarantool.org
Wed Aug 21 11:58:38 MSK 2024
This patch moves the aforementioned test from the <misc> to the <lang/>
directory (with slightly renaming to be consistent with other names),
includes it in <index>, and names the subtest.
Part of tarantool/tarantool#9398
---
test/LuaJIT-tests/lang/index | 1 +
test/LuaJIT-tests/lang/stackov_c.lua | 12 ++++++++++++
test/LuaJIT-tests/misc/stackovc.lua | 4 ----
3 files changed, 13 insertions(+), 4 deletions(-)
create mode 100644 test/LuaJIT-tests/lang/stackov_c.lua
delete mode 100644 test/LuaJIT-tests/misc/stackovc.lua
diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
index fa6db3c3..8da748d0 100644
--- a/test/LuaJIT-tests/lang/index
+++ b/test/LuaJIT-tests/lang/index
@@ -18,6 +18,7 @@ modulo.lua
concat.lua
self.lua
stackov.lua
+stackov_c.lua
table.lua
parse_comp.lua
parse_esc.lua
diff --git a/test/LuaJIT-tests/lang/stackov_c.lua b/test/LuaJIT-tests/lang/stackov_c.lua
new file mode 100644
index 00000000..cea1a09e
--- /dev/null
+++ b/test/LuaJIT-tests/lang/stackov_c.lua
@@ -0,0 +1,12 @@
+do --- Too many results to unpack.
+ local j = 1e4
+ local co = coroutine.create(function()
+ local t = {}
+ for i = 1, j do
+ t[i] = i
+ end
+ return unpack(t)
+ end)
+ local ok, err = coroutine.resume(co)
+ assert(not ok and string.find(err, "unpack"))
+end
diff --git a/test/LuaJIT-tests/misc/stackovc.lua b/test/LuaJIT-tests/misc/stackovc.lua
deleted file mode 100644
index c00bcbd8..00000000
--- a/test/LuaJIT-tests/misc/stackovc.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-local j = 1e4
-local co = coroutine.create(function() t = {} for i = 1, j do t[i] = i end return unpack(t) end)
-local ok, err = coroutine.resume(co)
-assert(not ok and string.find(err, "unpack"))
--
2.45.2
More information about the Tarantool-patches
mailing list