aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/excmd_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-13 19:32:06 -0700
committerGitHub <noreply@github.com>2019-09-13 19:32:06 -0700
commit9cf8cf605d85ec043d4e39f73ac42c7482c6f901 (patch)
treeb0a8ec8985c5bdfb1882ee847ff64b42c98d3e0a /test/functional/ex_cmds/excmd_spec.lua
parent427cf16e44d047c14e0ca1b95eb09fc8b8eb2f3d (diff)
parent6aae0e7c943267d2109ae20ec5086791c3b94a5e (diff)
downloadrneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.tar.gz
rneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.tar.bz2
rneovim-9cf8cf605d85ec043d4e39f73ac42c7482c6f901.zip
Merge #11015 from justinmk/getdigits
getdigits: introduce `strict`, `def` parameters
Diffstat (limited to 'test/functional/ex_cmds/excmd_spec.lua')
-rw-r--r--test/functional/ex_cmds/excmd_spec.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/excmd_spec.lua b/test/functional/ex_cmds/excmd_spec.lua
new file mode 100644
index 0000000000..aac2a9f469
--- /dev/null
+++ b/test/functional/ex_cmds/excmd_spec.lua
@@ -0,0 +1,32 @@
+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):E474: Invalid argument',
+ 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'))
+ eq('Vim(retab):E487: Argument must be positive',
+ pcall_err(command, ':retab 9999999999999999999999999999999999999999'))
+ assert_alive()
+ end)
+end)
+