os_setenv: use _wputenv_s; remove vestigial code #7920

_putenv_s variant was left over from 810d31a430, should have been
removed in cd5b131575.
This commit is contained in:
Justin M. Keyes
2018-01-27 12:50:10 +01:00
parent 533d4a36ec
commit 9153062095
3 changed files with 34 additions and 21 deletions

View File

@@ -2,13 +2,15 @@ local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq
local clear = helpers.clear
local command = helpers.command
local eval = helpers.eval
local meths = helpers.meths
local redir_exec = helpers.redir_exec
local source = helpers.source
before_each(clear)
describe(':let command', function()
describe(':let', function()
it('correctly lists variables with curly-braces', function()
meths.set_var('v', {0})
eq('\nv [0]', redir_exec('let {"v"}'))
@@ -42,4 +44,16 @@ describe(':let command', function()
call feedkeys(":\e:echo l1 l3\n:echo 42\n:cq\n", "t")
]=])
end)
it("sets environment variables", function()
local multibyte_multiline = [[\p* .ม .ม .ม .ม่ .ม่ .ม่ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹֻ ֹֻ ֹֻ
.ֹֻ .ֹֻ .ֹֻ ֹֻ ֹֻ ֹֻ .ֹֻ .ֹֻ .ֹֻ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹֻ ֹֻ
.ֹֻ .ֹֻ .ֹֻ a a a ca ca ca à à à]]
command("let $NVIM_TEST1 = 'AìaB'")
command("let $NVIM_TEST2 = 'AaあB'")
command("let $NVIM_TEST3 = '"..multibyte_multiline.."'")
eq('AìaB', eval('$NVIM_TEST1'))
eq('AaあB', eval('$NVIM_TEST2'))
eq(multibyte_multiline, eval('$NVIM_TEST3'))
end)
end)