[neovim] 03/05: test: expand_env_esc: Pass correct buffer size for outlen and assertion
James McCoy
jamessan at debian.org
Sun Jul 2 20:40:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch debian/experimental
in repository neovim.
commit 958e8ebea9ba7ce39c637739e7090995614485b2
Author: James McCoy <jamessan at jamessan.com>
Date: Sun Jul 2 12:51:06 2017 -0400
test: expand_env_esc: Pass correct buffer size for outlen and assertion
Running this test with a mocked passwd file whose $HOME was set to
/home/jamessan/src/debian.org/pkg-vim/deb-packages/neovim/neovim-0.2.0/debian/fakehome
caused the test to fail, since the expanded result was >= 99 bytes. The
test should be reflecting the actual size of the buffer, instead of some
arbitrary other number, anwyay.
Signed-off-by: James McCoy <jamessan at debian.org>
---
test/unit/os/env_spec.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/os/env_spec.lua b/test/unit/os/env_spec.lua
index 575787a..03c7947 100644
--- a/test/unit/os/env_spec.lua
+++ b/test/unit/os/env_spec.lua
@@ -229,10 +229,10 @@ describe('env function', 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()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/neovim.git
More information about the pkg-vim-maintainers
mailing list