aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-11-05 02:41:44 +0300
committerZyX <kp-pav@yandex.ru>2017-11-06 01:17:39 +0300
commit7bc6de75263f58c6c4f999bc86a6454ae9f28b80 (patch)
tree7d991ea5c093c0e3bf1705fe5a8a40de9402b4f1 /test/helpers.lua
parent07ec709141886c6db4f944665e07a36ef7302eb4 (diff)
downloadrneovim-7bc6de75263f58c6c4f999bc86a6454ae9f28b80.tar.gz
rneovim-7bc6de75263f58c6c4f999bc86a6454ae9f28b80.tar.bz2
rneovim-7bc6de75263f58c6c4f999bc86a6454ae9f28b80.zip
api/vim,functests: Add tests for nvim_parse_expression, fix found bugs
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 10f2f80191..67ac82e6fd 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -394,6 +394,11 @@ local function format_string(fmt, ...)
return ret
end
+local function intchar2lua(ch)
+ ch = tonumber(ch)
+ return (20 <= ch and ch < 127) and ('%c'):format(ch) or ch
+end
+
return {
eq = eq,
neq = neq,
@@ -412,4 +417,5 @@ return {
dedent = dedent,
format_luav = format_luav,
format_string = format_string,
+ intchar2lua = intchar2lua,
}