mirror of
https://github.com/neovim/neovim.git
synced 2026-02-04 11:04:30 +00:00
Merge pull request #6946 from jamessan/fix-expand_env_esc-test
test: expand_env_esc: Pass correct buffer size for outlen and assertion
This commit is contained in:
@@ -229,10 +229,10 @@ describe('env.c', function()
|
||||
|
||||
local src = to_cstr("~"..curuser.."/Vcs/django-rest-framework/rest_framework/renderers.py")
|
||||
local dst = cstr(256, "~"..curuser)
|
||||
cimp.expand_env_esc(src, dst, 1024, false, false, NULL)
|
||||
cimp.expand_env_esc(src, dst, 256, false, false, NULL)
|
||||
local len = string.len(ffi.string(dst))
|
||||
assert.True(len > 56)
|
||||
assert.True(len < 99)
|
||||
assert.True(len < 256)
|
||||
end)
|
||||
|
||||
itp('respects `dstlen` without expansion', function()
|
||||
|
||||
Reference in New Issue
Block a user