aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-29 23:45:02 +0200
committerGitHub <noreply@github.com>2019-08-29 23:45:02 +0200
commit9f81acc076779f891160423657cc35e6ac37c3e6 (patch)
tree025dff4b1cfa364061b88d24ec5152725132453c /test/helpers.lua
parent00d46f63286461eec4d7b2d7cae15fbe0d9cabdb (diff)
downloadrneovim-9f81acc076779f891160423657cc35e6ac37c3e6.tar.gz
rneovim-9f81acc076779f891160423657cc35e6ac37c3e6.tar.bz2
rneovim-9f81acc076779f891160423657cc35e6ac37c3e6.zip
paste: break lines at CR, CRLF #10877
Some terminals helpfully translate \n to \r. fix #10872 ref #10223
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 = {...}