mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
test: add a test for what Vim patch 8.2.0151 fixes
This commit is contained in:
parent
159a0b651f
commit
a6803f3adf
@ -19,6 +19,26 @@ describe(':source', function()
|
|||||||
clear()
|
clear()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('sourcing a file that is deleted and recreated is consistent vim-patch:8.1.0151', function()
|
||||||
|
local test_file = 'Xfile.vim'
|
||||||
|
local other_file = 'Xfoobar'
|
||||||
|
local script = [[
|
||||||
|
func Func()
|
||||||
|
endfunc
|
||||||
|
]]
|
||||||
|
write_file(test_file, script)
|
||||||
|
command('source ' .. test_file)
|
||||||
|
os.remove(test_file)
|
||||||
|
write_file(test_file, script)
|
||||||
|
command('source ' .. test_file)
|
||||||
|
os.remove(test_file)
|
||||||
|
write_file(other_file, '')
|
||||||
|
write_file(test_file, script)
|
||||||
|
command('source ' .. test_file)
|
||||||
|
os.remove(other_file)
|
||||||
|
os.remove(test_file)
|
||||||
|
end)
|
||||||
|
|
||||||
it('current buffer', function()
|
it('current buffer', function()
|
||||||
insert([[
|
insert([[
|
||||||
let a = 2
|
let a = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user