diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-04 21:56:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 21:56:05 +0200 |
commit | 1b70a1da0438018475a73e23015421b2212b34df (patch) | |
tree | bf2544be2eb77c21ecd1b3f19d3a1169ef64abfa /test/functional/helpers.lua | |
parent | 957a6506ef4672f2aa3df515bf9d971b7fc968f4 (diff) | |
parent | 63f72ac27c54d63fee049e45a5518d2d07fd379b (diff) | |
download | rneovim-1b70a1da0438018475a73e23015421b2212b34df.tar.gz rneovim-1b70a1da0438018475a73e23015421b2212b34df.tar.bz2 rneovim-1b70a1da0438018475a73e23015421b2212b34df.zip |
Merge #6958 from ZyX-I/fix-6957
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index d7858cacd5..f4b2a8dfdc 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -319,7 +319,14 @@ 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') - if not dont_dedent then + if type(text) == 'table' then + -- Byte blob + local bytes = text + text = '' + for _, char in ipairs(bytes) do + text = ('%s%c'):format(text, char) + end + elseif not dont_dedent then text = dedent(text) end file:write(text) |