aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cd_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-21 03:04:10 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-21 03:15:08 -0400
commit89e6973fe2b57316817877f64f0be5ebc5a25b7f (patch)
treee9245fad5bb75cdbb8d29b35a0a9ad8cbb0840c3 /test/functional/ex_cmds/cd_spec.lua
parentec71d87b8140ae097158f7e219b26701aed8158e (diff)
downloadrneovim-89e6973fe2b57316817877f64f0be5ebc5a25b7f.tar.gz
rneovim-89e6973fe2b57316817877f64f0be5ebc5a25b7f.tar.bz2
rneovim-89e6973fe2b57316817877f64f0be5ebc5a25b7f.zip
tcd: doc, error messages
Diffstat (limited to 'test/functional/ex_cmds/cd_spec.lua')
-rw-r--r--test/functional/ex_cmds/cd_spec.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua
index da22a85d6b..f5cce65104 100644
--- a/test/functional/ex_cmds/cd_spec.lua
+++ b/test/functional/ex_cmds/cd_spec.lua
@@ -110,34 +110,34 @@ end
-- Test legal parameters for 'getcwd' and 'haslocaldir'
for _, cmd in ipairs {'getcwd', 'haslocaldir'} do
- describe('getcwd()', function()
+ describe(cmd..'()', function()
-- Test invalid argument types
local expected = 'Vim(call):E474: Invalid argument'
- it('fails to parse a string', function()
+ it('fails on string', function()
eq(expected, exc_exec('call ' .. cmd .. '("some string")'))
end)
- it('fails to parse a float', function()
+ it('fails on float', function()
eq(expected, exc_exec('call ' .. cmd .. '(1.0)'))
end)
- it('fails to parse a list', function()
+ it('fails on list', function()
eq(expected, exc_exec('call ' .. cmd .. '([1, 2])'))
end)
- it('fails to parse a dictionary', function()
+ it('fails on dictionary', function()
eq(expected, exc_exec('call ' .. cmd .. '({"key": "value"})'))
end)
- it('fails to parse a funcref', function()
+ it('fails on funcref', function()
eq(expected, exc_exec('call ' .. cmd .. '(function("tr"))'))
end)
-
+
-- Test invalid numbers
- it('fails to parse number less than -1', function()
+ it('fails on number less than -1', function()
eq(expected, exc_exec('call ' .. cmd .. '(-2)'))
end)
- local expected = 'Vim(call):E5001: A higher-level scope cannot be -1 if a lower-level scope is >= 0.'
- it('fails to parse arument -1 when previous arg was greater than -1', function()
+ local expected = 'Vim(call):E5001: Higher scope cannot be -1 if lower scope is >= 0.'
+ it('fails on -1 if previous arg is >=0', function()
eq(expected, exc_exec('call ' .. cmd .. '(0, -1)'))
end)
-
+
-- Test wrong number of arguments
local expected = 'Vim(call):E118: Too many arguments for function: ' .. cmd
it('fails to parse more than one argument', function()