diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-12-07 01:14:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 01:14:21 -0500 |
commit | afaad8b54ebd2ad4ba2145f4069f5017cace3c8f (patch) | |
tree | 462cb857957f22fa3f8111d766c27907aebb19b4 /test/functional/vimscript/timer_spec.lua | |
parent | bf9e8a9df90941320ed898ac4c6351b78366a0a8 (diff) | |
parent | 6e3e8c51c0919df4d407b323d0e9237c278e2c23 (diff) | |
download | rneovim-afaad8b54ebd2ad4ba2145f4069f5017cace3c8f.tar.gz rneovim-afaad8b54ebd2ad4ba2145f4069f5017cace3c8f.tar.bz2 rneovim-afaad8b54ebd2ad4ba2145f4069f5017cace3c8f.zip |
Merge pull request #16194 from seandewar/vim-8.1.1925
vim-patch:7.4.1777,8.1.{1925,1995,2011,2012,2013,2166},8.2.{0532,0871,1168,1241,3576}
Diffstat (limited to 'test/functional/vimscript/timer_spec.lua')
-rw-r--r-- | test/functional/vimscript/timer_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/vimscript/timer_spec.lua b/test/functional/vimscript/timer_spec.lua index 9ee0735e40..e45b64422f 100644 --- a/test/functional/vimscript/timer_spec.lua +++ b/test/functional/vimscript/timer_spec.lua @@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen') local feed, eq, eval, ok = helpers.feed, helpers.eq, helpers.eval, helpers.ok local source, nvim_async, run = helpers.source, helpers.nvim_async, helpers.run local clear, command, funcs = helpers.clear, helpers.command, helpers.funcs +local exc_exec = helpers.exc_exec local curbufmeths = helpers.curbufmeths local load_adjust = helpers.load_adjust local retry = helpers.retry @@ -262,4 +263,13 @@ describe('timers', function() eq(2, eval('g:val')) end) + + it("timer_start can't be used in the sandbox", function() + source [[ + function! Scary(timer) abort + call execute('echo ''execute() should be disallowed''', '') + endfunction + ]] + eq("Vim(call):E48: Not allowed in sandbox", exc_exec("sandbox call timer_start(0, 'Scary')")) + end) end) |