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 53752BB2FB4; Thu, 20 Jun 2024 15:15:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 53752BB2FB4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718885751; bh=/v0AN0W3HQKN/0fghTWL337yUvIg0JSmCv/YmXILwoo=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rhA9mRHJYQGZ354VbMJL+2G+g+kARxC9uMxjX3w78En+yFsB71YqY4VIYLQ651l99 F0rgX1YtS1rgj7mogUo0qYB2Hm5Upccq34NK7isaKPrlsravukR0wp26cOhVJESdK8 XMXNLT5USQG55EKy5wtSAIBQWan10as+K7WC4V4U= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [95.163.41.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8626DBB2FB2 for ; Thu, 20 Jun 2024 15:15:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8626DBB2FB2 Received: by exim-smtp-59d576c665-6hwst with esmtpa (envelope-from ) id 1sKGg8-00000000Ju6-2mc5; Thu, 20 Jun 2024 15:14:13 +0300 Content-Type: multipart/alternative; boundary="------------o09bUdkEjdinhorIbF02voTp" Message-ID: <27255eb3-ec83-41d6-acd3-53c5b4fc78f7@tarantool.org> Date: Thu, 20 Jun 2024 15:14:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Sergey Bronnikov References: <9234535074cc11e0682353c0e5e865bb22cd88f0.1712841312.git.sergeyb@tarantool.org> In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9EB52AADBDB11C149B864422FB2C3D18C038AB39955469439182A05F5380850400060BE7E69B9740B3DE06ABAFEAF6705CCEF97C36B97E0F141BD5BA4EEE4B0C0DBD6ABFBCFC3BAB6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE716FAD50E497B9C14EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637560334CFC131571A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8A5C6C959AD481D2FC62B935C0A6A969717945D02B4B5FA9ECC7F00164DA146DAFE8445B8C89999728AA50765F7900637028599BB38096F4F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC80CABCCA60F52D7EBF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CAD0E433DBF1FBFA39735652A29929C6C4AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C391041352CAA6A1D7BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE74F0F518E68DBD4F843847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A50D0BAD08DDBFEA145002B1117B3ED696D3AE30D709CE41A0FB820E9FE7BD014C823CB91A9FED034534781492E4B8EEAD09F854029C6BD0DABDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF3510724CE5C1083BF75703C8CFA258AA3CA66FC9765E03DB008E984150653DEFF509D27A9878C191D0E46988893CD66F400634C1B1270DE0E1F8E0E8A2A889049835DACA931138D0C226CC413062362A913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojstWfowt7DqJLWG/5pp5g1g== X-Mailru-Sender: 49D287FBCBBF3A5C1D5C29A1EFFD41C3CC4317DBD1A0A237B951B70A5BD4BD8E511C211FE2FCCA2260497F7EF99AAC8FEBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/4][v2] test: introduce a helper read_file 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------o09bUdkEjdinhorIbF02voTp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Sergey On 12.04.2024 13:47, Sergey Kaplun wrote: >> +function M.read_file(path) >> + local file = assert(io.open(path), 'cannot open an object file') Fixed and force-pushed a message in assert: --- a/test/tarantool-tests/utils/tools.lua +++ b/test/tarantool-tests/utils/tools.lua @@ -15,7 +15,7 @@ end  -- Reads a file located at a specified path and returns its  -- content.  function M.read_file(path) -  local file = assert(io.open(path), 'cannot open an object file') +  local file = assert(io.open(path), 'cannot open a file')    local content = file:read('*a') file:close()    return content >> + local content =file:read('*a') >> +file:close() >> + return content >> +end >> + >> return M >> -- >> 2.34.1 >> --------------o09bUdkEjdinhorIbF02voTp Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi, Sergey

On 12.04.2024 13:47, Sergey Kaplun wrote:


<snipped>


      
+function M.read_file(path)
+  local file = assert(io.open(path), 'cannot open an object file')

Fixed and force-pushed a message in assert:


--- a/test/tarantool-tests/utils/tools.lua
+++ b/test/tarantool-tests/utils/tools.lua
@@ -15,7 +15,7 @@ end
 -- Reads a file located at a specified path and returns its
 -- content.
 function M.read_file(path)
-  local file = assert(io.open(path), 'cannot open an object file')
+  local file = assert(io.open(path), 'cannot open a file')
   local content = file:read('*a')
   file:close()
   return content


+  local content = file:read('*a')
+  file:close()
+  return content
+end
+
 return M
-- 
2.34.1


    
--------------o09bUdkEjdinhorIbF02voTp--