diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index d5356416af..e7d8c185ba 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -330,9 +330,10 @@ format_luav = function(v, indent) end local ret = '' if type(v) == 'string' then - ret = '\'' .. tostring(v):gsub('[\'\\]', '\\%0'):gsub('[%z\1-\31]', function(match) - return SUBTBL[match:byte()] - end) .. '\'' + ret = tostring(v):gsub('[\'\\]', '\\%0'):gsub('[%z\1-\31]', function(match) + return SUBTBL[match:byte() + 1] + end) + ret = '\'' .. ret .. '\'' elseif type(v) == 'table' then local processed_keys = {} ret = '{' .. linesep |