diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-05 02:42:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 02:42:10 +0100 |
commit | 67848c0b916cc1b130bac975017f8e0c762ddc4c (patch) | |
tree | 9dc091bfc2548cfc9cd481b47e2df1d6e8e333b7 /test/functional/helpers.lua | |
parent | a494c999189200c36786f7c453c5c316244da0d1 (diff) | |
parent | 2d4abc1caedf67487e100f5cef5eca78da68b3e7 (diff) | |
download | rneovim-67848c0b916cc1b130bac975017f8e0c762ddc4c.tar.gz rneovim-67848c0b916cc1b130bac975017f8e0c762ddc4c.tar.bz2 rneovim-67848c0b916cc1b130bac975017f8e0c762ddc4c.zip |
Merge #7653 from justinmk/tui-termcap
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index da334d4ac6..f939567693 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -261,6 +261,7 @@ local function retry(max, max_ms, fn) if status then return result end + luv.update_time() -- Update cached value of luv.now() (libuv: uv_now()). if (max and tries >= max) or (luv.now() - start_time > timeout) then if type(result) == "string" then result = "\nretry() attempts: "..tostring(tries).."\n"..result @@ -333,8 +334,8 @@ local function feed_command(...) end -- Dedent the given text and write it to the file name. -local function write_file(name, text, dont_dedent) - local file = io.open(name, 'w') +local function write_file(name, text, no_dedent, append) + local file = io.open(name, (append and 'a' or 'w')) if type(text) == 'table' then -- Byte blob local bytes = text @@ -342,7 +343,7 @@ local function write_file(name, text, dont_dedent) for _, char in ipairs(bytes) do text = ('%s%c'):format(text, char) end - elseif not dont_dedent then + elseif not no_dedent then text = dedent(text) end file:write(text) |