diff options
author | James McCoy <jamessan@jamessan.com> | 2017-07-02 12:51:06 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-07-02 12:52:43 -0400 |
commit | 4d017256996fe7c7e19944f78c67d9fcb156ada7 (patch) | |
tree | 6c257d08db6ccf66279bb8e1a9516afad74a867a | |
parent | ca4633bfe4d0f58bd5fb7343d282fafb71f3a3ee (diff) | |
download | rneovim-4d017256996fe7c7e19944f78c67d9fcb156ada7.tar.gz rneovim-4d017256996fe7c7e19944f78c67d9fcb156ada7.tar.bz2 rneovim-4d017256996fe7c7e19944f78c67d9fcb156ada7.zip |
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.
-rw-r--r-- | test/unit/os/env_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/os/env_spec.lua b/test/unit/os/env_spec.lua index cefd0315b7..c54d5a9b77 100644 --- a/test/unit/os/env_spec.lua +++ b/test/unit/os/env_spec.lua @@ -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() |