mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	Problem:    Ex command error cannot contain an argument.
Solution:   Add ex_errmsg() and translate earlier.  Use e_trailing_arg where
            possible.
8930caaa1a
Remove duplicate test file 062_tab_pages_spec.lua
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
local helpers = require("test.functional.helpers")(after_each)
 | 
						|
local command = helpers.command
 | 
						|
local eq = helpers.eq
 | 
						|
local clear = helpers.clear
 | 
						|
local pcall_err = helpers.pcall_err
 | 
						|
local assert_alive = helpers.assert_alive
 | 
						|
 | 
						|
describe('Ex cmds', function()
 | 
						|
  before_each(function()
 | 
						|
    clear()
 | 
						|
  end)
 | 
						|
 | 
						|
  it('handle integer overflow from user-input #5555', function()
 | 
						|
    command(':9999999999999999999999999999999999999999')
 | 
						|
    command(':later 9999999999999999999999999999999999999999')
 | 
						|
    command(':echo expand("#<9999999999999999999999999999999999999999")')
 | 
						|
    command(':lockvar 9999999999999999999999999999999999999999')
 | 
						|
    command(':winsize 9999999999999999999999999999999999999999 9999999999999999999999999999999999999999')
 | 
						|
    eq('Vim(tabnext):E475: Invalid argument: 9999999999999999999999999999999999999999',
 | 
						|
      pcall_err(command, ':tabnext 9999999999999999999999999999999999999999'))
 | 
						|
    eq('Vim(Next):E939: Positive count required',
 | 
						|
      pcall_err(command, ':N 9999999999999999999999999999999999999999'))
 | 
						|
    eq('Vim(menu):E329: No menu "9999999999999999999999999999999999999999"',
 | 
						|
      pcall_err(command, ':menu 9999999999999999999999999999999999999999'))
 | 
						|
    eq('Vim(bdelete):E939: Positive count required',
 | 
						|
      pcall_err(command, ':bdelete 9999999999999999999999999999999999999999'))
 | 
						|
    assert_alive()
 | 
						|
  end)
 | 
						|
end)
 | 
						|
 |