aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index ce5e8b9c04..b571085b4e 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -455,6 +455,12 @@ local SUBTBL = {
'\\030', '\\031',
}
+-- Formats Lua value `v`.
+--
+-- TODO(justinmk): redundant with vim.inspect() ?
+--
+-- "Nice table formatting similar to screen:snapshot_util()".
+-- Commit: 520c0b91a528
function module.format_luav(v, indent, opts)
opts = opts or {}
local linesep = '\n'
@@ -533,6 +539,9 @@ function module.format_luav(v, indent, opts)
return ret
end
+-- Like Python repr(), "{!r}".format(s)
+--
+-- Commit: 520c0b91a528
function module.format_string(fmt, ...)
local i = 0
local args = {...}