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 A894D6F3C7; Fri, 26 Mar 2021 10:46:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A894D6F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616744801; bh=/0Q3p6bm73wFPbbbXYe7AHDNiIuv0MGlGBD3FSKK1L8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=YZl6vFPIwNFYmdqWTB+3viS9/D4PRejmPcI2vzoDfeznZDygPyOHy+Z+AA5DnbvrB 3DpIGTsOAl6DSDDmpqSXxdiw47YukLGrdK2L7kWG2zqNpzkMw5yn56zIykFzBxaWeq df6qmPTi4iaWYjwo8QQmoXTiHSvMjDyEi2sSQvw0= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 47A066F3C7 for ; Fri, 26 Mar 2021 10:44:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 47A066F3C7 Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lPh8d-00042u-7k; Fri, 26 Mar 2021 10:44:11 +0300 To: Sergey Ostanevich , Igor Munkin Date: Fri, 26 Mar 2021 10:42:48 +0300 Message-Id: <4a8669339a59964c0b187263f864692946d51303.1616743343.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE9F3698E42D5F8E2CF5ABB710F58BD1CA8182A05F5380850402F57EFD47E10598F20EE3F035A733737FBF94B58739FE1A407F3F2C3C5F8E3B6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A8325FA649D0A450EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006370CE92FB8C11ED3D88638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D228DD69C43F94903D5E01D85B59BAA48A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE767883B903EA3BAEA9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C317B107DEF921CE79117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7351D6A3D1828C120DEC4224003CC83647689D4C264860C145E X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4B5F30041107ECCAEB459AD25B48836B76E15E3BE9FD72F9AC6CDE5D1141D2B1C3BF2E2ACF9790F7D3A145B93155B67F19893BCA6CC57ACC2AD91A466A1DEF99B296C473AB1E142180E5E5C374F3061BC4149B4CAC14B9A2E0BBB3A167846B17663BCA2221C7DE5E315E2725BA614EAEA1EF972C1F679AE1C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C974B02B4EA30DFB79906AD5CBE5A67C90046234709B0746B202508EDDA58D8B8C9A4A39F274A89C1D7E09C32AA3244CBCFF1AE4257FA9C21BCB543B97430D96259227199D06760A927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAgKohJGAQ5Rmw== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4188F3AEB94DAD758C37CE200D0FCECB7F1BEAF8DD7A21810F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 05/30] test: adapt arg availability test from Lua suite 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" The argument table `arg` can be read (and modified) by `LUA_INIT` and `-e` chunks since the commit 92d9ff211ae864777a8580b5a7326d5f408161ce (Set arg table before evaluating LUA_INIT and -e chunks.). This behaviour is similar to Lua 5.3, so the test was adapted considering PUC-Rio Lua 5.3 test suite taken from https://www.lua.org/tests/lua-5.3.0-tests.tar.gz. Closes tarantool/tarantool#5686 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- test/PUC-Lua-5.1-tests/main.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/PUC-Lua-5.1-tests/main.lua b/test/PUC-Lua-5.1-tests/main.lua index 4f8b8bf..c11a576 100644 --- a/test/PUC-Lua-5.1-tests/main.lua +++ b/test/PUC-Lua-5.1-tests/main.lua @@ -69,9 +69,19 @@ a = string.format(a, progname) prepfile(a) RUN('lua "-e " -- %s a b c', prog) -prepfile"assert(arg==nil)" +-- test 'arg' availability in libraries +-- LuaJIT: LuaJIT v2.1.0-beta3 has extension from Lua 5.3: +-- The argument table `arg` can be read (and modified) +-- by `LUA_INIT` and `-e` chunks. +-- See commit 92d9ff211ae864777a8580b5a7326d5f408161ce +-- (Set arg table before evaluating LUA_INIT and -e chunks.). +-- See also https://github.com/tarantool/tarantool/issues/5686. +-- In Lua 5.3 this feature was introduced via commit +-- 23f0ff95177eda2e0a80e3a48562cc6837705735. +-- Test is adapted from PUC-Rio Lua 5.3 test suite. +prepfile"assert(arg)" prepfile("assert(arg)", otherprog) -RUN("lua -l%s - < %s", prog, otherprog) +RUN('env LUA_PATH="?;;" lua -l%s - < %s', prog, otherprog) prepfile"" RUN("lua - < %s > %s", prog, out) -- 2.31.0