blob: 9b81c6d06d37688cee4bd55046bdcf2d9043a807 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
-- Specs for :wundo and underlying functions
local n = require('test.functional.testnvim')()
local command = n.command
local clear = n.clear
local eval = n.eval
local set_session = n.set_session
describe(':wundo', function()
before_each(clear)
after_each(function()
os.remove(eval('getcwd()') .. '/foo')
end)
it('safely fails on new, non-empty buffer', function()
command('normal! iabc')
command('wundo foo') -- This should not segfault. #1027
--TODO: check messages for error message
end)
end)
describe('u_* functions', function()
it('safely fail on new, non-empty buffer', function()
local session = n.new_session(false, {
args = {
'-c',
'set undodir=. undofile',
},
})
set_session(session)
command('echo "True"') -- Should not error out due to crashed Neovim
session:close()
end)
end)
|