[Tarantool-patches] [PATCH v2 luajit 19/30] test: remove assert for string.gfind check

Sergey Kaplun skaplun at tarantool.org
Fri Mar 26 10:43:02 MSK 2021


In Lua 5.1 function `string.gfind()` was renamed to `string.gmatch()`.
You can use it if Lua 5.1 is built with compile-time option
`-DLUA_COMPAT_GFIND`.
This built-in is removed from LuaJIT.

This patch removes test checking that `string.gfind()` and
`string.gmatch() is the same function.

Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
 test/PUC-Lua-5.1-tests/pm.lua | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/PUC-Lua-5.1-tests/pm.lua b/test/PUC-Lua-5.1-tests/pm.lua
index fa125dc..b159b6b 100644
--- a/test/PUC-Lua-5.1-tests/pm.lua
+++ b/test/PUC-Lua-5.1-tests/pm.lua
@@ -223,7 +223,6 @@ assert(string.gsub("a alo b hi", "%w%w+", t) == "a ALO b HI")
 
 
 -- tests for gmatch
-assert(string.gfind == string.gmatch)
 local a = 0
 for i in string.gmatch('abcde', '()') do assert(i == a+1); a=i end
 assert(a==6)
-- 
2.31.0



More information about the Tarantool-patches mailing list