[Tarantool-patches] [PATCH luajit v3 23/29] test: disable PUC-Rio test for non-asci identifier

Sergey Kaplun skaplun at tarantool.org
Tue Apr 13 16:27:23 MSK 2021


LuaJIT does not forbid using non-alphanumeric symbols as identifiers,
unlike Lua does.

This patch disables the test that expects an error during parsing the
variable name containing octal \255 as the first char in a variable
name.

Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
 test/PUC-Rio-Lua-5.1-tests/errors.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/PUC-Rio-Lua-5.1-tests/errors.lua b/test/PUC-Rio-Lua-5.1-tests/errors.lua
index 1cc01564..ee07e14d 100644
--- a/test/PUC-Rio-Lua-5.1-tests/errors.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/errors.lua
@@ -206,7 +206,11 @@ checksyntax("[[a]]", "", "[[a]]", 1)
 checksyntax("'aa'", "", "'aa'", 1)
 
 -- test 255 as first char in a chunk
-checksyntax("\255a = 1", "", "\255", 1)
+-- LuaJIT: LuaJIT does not forbid using non-alphanumeric symbols
+-- as identifiers, unlike Lua does.
+-- For more details see <src/lj_char.c> and <src/lj_lex.c>.
+-- Test is disabled for LuaJIT.
+-- checksyntax("\255a = 1", "", "\255", 1)
 
 doit('I = loadstring("a=9+"); a=3')
 assert(a==3 and I == nil)
-- 
2.31.0



More information about the Tarantool-patches mailing list