mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	Problem:    Channel and sandbox code not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855)
ca68ae1311
Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			974 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			974 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
local helpers = require('test.functional.helpers')(after_each)
 | 
						|
local Screen = require('test.functional.ui.screen')
 | 
						|
local clear = helpers.clear
 | 
						|
local command = helpers.command
 | 
						|
local feed = helpers.feed
 | 
						|
 | 
						|
before_each(clear)
 | 
						|
 | 
						|
describe('cpoptions', function()
 | 
						|
  it('$', function()
 | 
						|
    local screen = Screen.new(30, 6)
 | 
						|
    screen:attach()
 | 
						|
    command('set cpo+=$')
 | 
						|
    command([[call setline(1, 'one two three')]])
 | 
						|
    feed('c2w')
 | 
						|
    screen:expect([[
 | 
						|
      ^one tw$ three                 |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
      -- INSERT --                  |
 | 
						|
    ]])
 | 
						|
    feed('vim<Esc>')
 | 
						|
    screen:expect([[
 | 
						|
      vi^m three                     |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
      ~                             |
 | 
						|
                                    |
 | 
						|
    ]])
 | 
						|
  end)
 | 
						|
end)
 |