aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index b886596e00..6a9f4a22b4 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -15,6 +15,7 @@ describe('external cmdline', function()
before_each(function()
clear()
+ cmdline, block = {}, nil
screen = Screen.new(25, 5)
screen:attach({rgb=true, ext_cmdline=true})
screen:set_on_event_handler(function(name, data)
@@ -457,6 +458,25 @@ describe('external cmdline', function()
end)
end)
+ it('works with inputsecret()', function()
+ feed(":call inputsecret('secret:')<cr>abc123")
+ screen:expect([[
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ |
+ ]], nil, nil, function()
+ eq({{
+ content = { { {}, "******" } },
+ firstc = "",
+ indent = 0,
+ pos = 6,
+ prompt = "secret:"
+ }}, cmdline)
+ end)
+ end)
+
it('works with highlighted cmdline', function()
source([[
highlight RBP1 guibg=Red