aboutsummaryrefslogtreecommitdiff
path: root/test/functional/viml/function_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-07-08 00:08:21 +0200
committerGitHub <noreply@github.com>2018-07-08 00:08:21 +0200
commit57fafcea23e2609e40ecacf27b2d68add9b1f7e9 (patch)
tree5261d02299702681979fb846f6dbe62d811f77d0 /test/functional/viml/function_spec.lua
parent378d5f0fa3945712c012accf9cdc3d8a17e2a168 (diff)
parenta5ed46024185c817e3cc0f38b13b302fdf7a863a (diff)
downloadrneovim-57fafcea23e2609e40ecacf27b2d68add9b1f7e9.tar.gz
rneovim-57fafcea23e2609e40ecacf27b2d68add9b1f7e9.tar.bz2
rneovim-57fafcea23e2609e40ecacf27b2d68add9b1f7e9.zip
Merge #8702 from janlazo/nvim-8.0.0654
Diffstat (limited to 'test/functional/viml/function_spec.lua')
-rw-r--r--test/functional/viml/function_spec.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/functional/viml/function_spec.lua b/test/functional/viml/function_spec.lua
index 0cf92f7d40..b8137038b1 100644
--- a/test/functional/viml/function_spec.lua
+++ b/test/functional/viml/function_spec.lua
@@ -2,16 +2,11 @@ local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq
local clear = helpers.clear
-local funcs = helpers.funcs
local dedent = helpers.dedent
local redir_exec = helpers.redir_exec
before_each(clear)
-local function check_nofunc(fname)
- eq(0, funcs.exists('*' .. fname))
-end
-
local function check_func(fname, body, indent)
if type(body) == 'number' then
body = ('return %i'):format(body)
@@ -141,12 +136,12 @@ describe(':endfunction', function()
]]))
check_func('F1', 42)
end)
- it('errors out on an uncommented bar', function()
- eq('\nE488: Trailing characters: | echo 42', redir_exec([[
+ it('accepts uncommented bar', function()
+ eq('\n42', redir_exec([[
function F1()
endfunction | echo 42
]]))
- check_nofunc('F1')
+ check_func('F1')
end)
it('allows running multiple commands', function()
eq('\n2', redir_exec([[