mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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}
This commit is contained in:
@@ -17,7 +17,7 @@ describe('searchpos', function()
|
||||
call('cursor', 1, 1)
|
||||
eq({1, 1, 2}, eval([[searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')]]))
|
||||
call('cursor', 1, 2)
|
||||
eq({2, 1, 1}, eval([[searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')]]))
|
||||
eq({2, 1, 1}, eval([['\%(\([a-z]\)\|\_.\)\{-}xyz'->searchpos('pcW')]]))
|
||||
|
||||
command('set cpo-=c')
|
||||
call('cursor', 1, 2)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user