diff options
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index d15afc81bb..f8680678ef 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -348,6 +348,35 @@ describe('external cmdline', function() { { {}, ' line1'} } }, block) end) + feed('endfunction<cr>') + screen:expect([[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]], nil, nil, function() + eq(nil, block) + end) + + -- Try once more, to check buffer is reinitialized. #8007 + feed(':function Bar()<cr>') + screen:expect([[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]], nil, nil, function() + eq({{ + content = { { {}, "" } }, + firstc = ":", + indent = 2, + pos = 0, + prompt = "", + }}, cmdline) + eq({ { { {}, 'function Bar()'} } }, block) + end) feed('endfunction<cr>') screen:expect([[ |