diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-12-01 08:05:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-01 08:05:44 +0100 |
commit | 1f8a3da796dd3418c5204c76192179dbdd6a5373 (patch) | |
tree | 74c5d925a279cd3e59a8adace6e0cbb32c40dca0 /test/functional/ui/screen_basic_spec.lua | |
parent | 0e1c406df4e661602b67dde5e46d69fe7345b1a9 (diff) | |
parent | 3cf4b14e966ec04371d38af6451bc69eaadb425b (diff) | |
download | rneovim-1f8a3da796dd3418c5204c76192179dbdd6a5373.tar.gz rneovim-1f8a3da796dd3418c5204c76192179dbdd6a5373.tar.bz2 rneovim-1f8a3da796dd3418c5204c76192179dbdd6a5373.zip |
Merge pull request #5669 from chemzqm/add-cmdline-mode-rpc
Add cmdline mode to ui_mode_change
Diffstat (limited to 'test/functional/ui/screen_basic_spec.lua')
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 593b6dd763..d03f98c26f 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -642,5 +642,52 @@ describe('Screen', function() eq("normal", screen.mode) end) end) + + it('works in cmdline mode', function() + feed(':') + screen:expect([[ + | + {0:~ }| + {0:~ }| + {0:~ }| + :^ | + ]],nil,nil,function () + eq("cmdline", screen.mode) + end) + + feed('<esc>/') + screen:expect([[ + | + {0:~ }| + {0:~ }| + {0:~ }| + /^ | + ]],nil,nil,function () + eq("cmdline", screen.mode) + end) + + + feed('<esc>?') + screen:expect([[ + | + {0:~ }| + {0:~ }| + {0:~ }| + ?^ | + ]],nil,nil,function () + eq("cmdline", screen.mode) + end) + + feed('<esc>') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + | + ]],nil,nil,function () + eq("normal", screen.mode) + end) + end) end) end) |