[Tarantool-patches] [PATCH luajit 2/4][v2] test: introduce a helper read_file

Sergey Bronnikov sergeyb at tarantool.org
Thu Jun 20 15:14:08 MSK 2024


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
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20240620/72cf0da6/attachment.htm>


More information about the Tarantool-patches mailing list