From 9f81acc076779f891160423657cc35e6ac37c3e6 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Aug 2019 23:45:02 +0200 Subject: paste: break lines at CR, CRLF #10877 Some terminals helpfully translate \n to \r. fix #10872 ref #10223 --- test/helpers.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/helpers.lua') 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 = {...} -- cgit