diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-01-11 10:39:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 10:39:41 +0100 |
commit | 911b1e49abb88a533711ce55376d2893d6424d29 (patch) | |
tree | add3e83843cdc030ad38b1c33f40bdda419f457b /test/functional/helpers.lua | |
parent | f0845197d868735dc97aac72738b69c639c634b3 (diff) | |
parent | 5055d4a755d3c100cddf51bded77abca04beb971 (diff) | |
download | rneovim-911b1e49abb88a533711ce55376d2893d6424d29.tar.gz rneovim-911b1e49abb88a533711ce55376d2893d6424d29.tar.bz2 rneovim-911b1e49abb88a533711ce55376d2893d6424d29.zip |
Merge #7821 'api: nvim_command_output'
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 31a2c3b3ff..dfc4694272 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -644,7 +644,7 @@ local function alter_slashes(obj) end local function hexdump(str) - local len = string.len( str ) + local len = string.len(str) local dump = "" local hex = "" local asc = "" @@ -652,22 +652,20 @@ local function hexdump(str) for i = 1, len do if 1 == i % 8 then dump = dump .. hex .. asc .. "\n" - hex = string.format( "%04x: ", i - 1 ) + hex = string.format("%04x: ", i - 1) asc = "" end - local ord = string.byte( str, i ) - hex = hex .. string.format( "%02x ", ord ) + local ord = string.byte(str, i) + hex = hex .. string.format("%02x ", ord) if ord >= 32 and ord <= 126 then - asc = asc .. string.char( ord ) + asc = asc .. string.char(ord) else asc = asc .. "." end end - return dump .. hex - .. string.rep( " ", 8 - len % 8 ) .. asc - + return dump .. hex .. string.rep(" ", 8 - len % 8) .. asc end local module = { |