mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
		
			
				
	
	
		
			30 lines
		
	
	
		
			958 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			958 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
-- Specs for :wundo and underlying functions
 | 
						|
 | 
						|
local helpers = require('test.functional.helpers')(after_each)
 | 
						|
local execute, clear, eval, feed, spawn, nvim_prog, set_session =
 | 
						|
  helpers.execute, helpers.clear, helpers.eval, helpers.feed, helpers.spawn,
 | 
						|
  helpers.nvim_prog, helpers.set_session
 | 
						|
 | 
						|
 | 
						|
describe(':wundo', function()
 | 
						|
  before_each(clear)
 | 
						|
 | 
						|
  it('safely fails on new, non-empty buffer', function()
 | 
						|
    feed('iabc<esc>')
 | 
						|
    execute('wundo foo') -- This should not segfault. #1027
 | 
						|
    --TODO: check messages for error message
 | 
						|
 | 
						|
    os.remove(eval('getcwd()') .. '/foo') --cleanup
 | 
						|
  end)
 | 
						|
end)
 | 
						|
 | 
						|
describe('u_* functions', function()
 | 
						|
  it('safely fail on new, non-empty buffer', function()
 | 
						|
    local session = spawn({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed',
 | 
						|
                           '-c', 'set undodir=. undofile'})
 | 
						|
    set_session(session)
 | 
						|
    execute('echo "True"')  -- Should not error out due to crashed Neovim
 | 
						|
    session:close()
 | 
						|
  end)
 | 
						|
end)
 |