aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/file_perm_spec.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-10-10 16:48:24 -0400
committerGitHub <noreply@github.com>2021-10-10 16:48:24 -0400
commitb3e0d6708eca3cd22695d364ba2aca7401cc0f8c (patch)
treee2742ee0a6b33161887d9dab6069357e337aa302 /test/functional/legacy/file_perm_spec.lua
parent62eec98d5feee9173ea2decb2d7cb72971c24f8b (diff)
parenta8504638cd2497b3bdd0daf27dcc50903e1e2bb9 (diff)
downloadrneovim-b3e0d6708eca3cd22695d364ba2aca7401cc0f8c.tar.gz
rneovim-b3e0d6708eca3cd22695d364ba2aca7401cc0f8c.tar.bz2
rneovim-b3e0d6708eca3cd22695d364ba2aca7401cc0f8c.zip
Merge pull request #15502 from seandewar/vim-8.1.1921
Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
Diffstat (limited to 'test/functional/legacy/file_perm_spec.lua')
-rw-r--r--test/functional/legacy/file_perm_spec.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/legacy/file_perm_spec.lua b/test/functional/legacy/file_perm_spec.lua
index 8fdee95e91..ccdbfe0534 100644
--- a/test/functional/legacy/file_perm_spec.lua
+++ b/test/functional/legacy/file_perm_spec.lua
@@ -3,7 +3,7 @@ require('os')
local helpers = require('test.functional.helpers')(after_each)
local clear, call, eq = helpers.clear, helpers.call, helpers.eq
-local neq, exc_exec = helpers.neq, helpers.exc_exec
+local neq, exc_exec, eval = helpers.neq, helpers.exc_exec, helpers.eval
describe('Test getting and setting file permissions', function()
local tempfile = helpers.tmpname()
@@ -14,11 +14,12 @@ describe('Test getting and setting file permissions', function()
end)
it('file permissions', function()
+ -- eval() is used to test VimL method syntax for setfperm() and getfperm()
eq('', call('getfperm', tempfile))
- eq(0, call('setfperm', tempfile, 'r--------'))
+ eq(0, eval("'" .. tempfile .. "'->setfperm('r--------')"))
call('writefile', {'one'}, tempfile)
- eq(9, call('len', call('getfperm', tempfile)))
+ eq(9, eval("len('" .. tempfile .. "'->getfperm())"))
eq(1, call('setfperm', tempfile, 'rwx------'))
if helpers.is_os('win') then