diff options
author | ZyX <kp-pav@yandex.ru> | 2017-10-08 21:52:38 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-10-15 19:13:52 +0300 |
commit | af38cea133f5ebb67208cedd289e408cd1dad15a (patch) | |
tree | 807f8594a4842ad5fd4d51fc6596ea7594ea3dd9 /test/helpers.lua | |
parent | c484613ce034cf9b10a4185621abdf8d82b570f8 (diff) | |
download | rneovim-af38cea133f5ebb67208cedd289e408cd1dad15a.tar.gz rneovim-af38cea133f5ebb67208cedd289e408cd1dad15a.tar.bz2 rneovim-af38cea133f5ebb67208cedd289e408cd1dad15a.zip |
viml/parser/expressions: Add support for string parsing
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 |