From bde59e81473f29944ef80ff98f6b2c88010b2df6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 11 Jun 2023 22:12:32 +0800 Subject: fix(remote): restore previous --remote-expr output formatting (#23988) - Use tostring() as that's what print() uses internally. - Do not append trailing new line. --- test/functional/core/remote_spec.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/functional/core/remote_spec.lua b/test/functional/core/remote_spec.lua index 23aab400df..20650bef52 100644 --- a/test/functional/core/remote_spec.lua +++ b/test/functional/core/remote_spec.lua @@ -8,7 +8,6 @@ local exec_lua = helpers.exec_lua local expect = helpers.expect local funcs = helpers.funcs local insert = helpers.insert -local is_os = helpers.is_os local nvim_prog = helpers.nvim_prog local new_argv = helpers.new_argv local neq = helpers.neq @@ -105,10 +104,12 @@ describe('Remote', function() end) it('evaluate expressions', function() - local linesep = is_os('win') and '\r\n' or '\n' - eq({ "function('get')" .. linesep, '' }, run_remote('--remote-expr', 'function("get")')) - eq({ '0' .. linesep, '' }, run_remote('--remote-expr', 'setline(1, "Yo")')) + eq({ '0', '' }, run_remote('--remote-expr', 'setline(1, "Yo")')) + eq({ 'Yo', '' }, run_remote('--remote-expr', 'getline(1)')) expect('Yo') + eq({ '1.25', '' }, run_remote('--remote-expr', '1.25')) + eq({ 'no', '' }, run_remote('--remote-expr', '0z6E6F')) + eq({ '\t', '' }, run_remote('--remote-expr', '"\t"')) end) end) -- cgit