aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-30 08:56:38 -0400
committerGitHub <noreply@github.com>2020-10-30 08:56:38 -0400
commit9fee5f14239512aed1096b17e8e755c87b9055d2 (patch)
tree9a4c946b624639b153b4e97fdd1a8755094b52ca /test/functional
parent037ffd54dcd8edba6787d93273e6696b7a366ac6 (diff)
parent4e24e31a6b2c45e0bc2ab15059a51092b29ebaf5 (diff)
downloadrneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.tar.gz
rneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.tar.bz2
rneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.zip
Merge pull request #13172 from janlazo/vim-8.2.1910
vim-patch:8.1.{2034,2050},8.2.{131,913,929,1521,1910,1913,1922}
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/cmdline_spec.lua66
-rw-r--r--test/functional/ui/cmdline_spec.lua32
2 files changed, 66 insertions, 32 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua
new file mode 100644
index 0000000000..9ebe9aeb91
--- /dev/null
+++ b/test/functional/legacy/cmdline_spec.lua
@@ -0,0 +1,66 @@
+local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
+local clear = helpers.clear
+local feed = helpers.feed
+local feed_command = helpers.feed_command
+local source = helpers.source
+
+describe('cmdline', function()
+ before_each(clear)
+
+ it('is cleared when switching tabs', function()
+ local screen = Screen.new(30, 10)
+ screen:attach()
+ feed_command([[call setline(1, range(30))]])
+ screen:expect([[
+ ^0 |
+ 1 |
+ 2 |
+ 3 |
+ 4 |
+ 5 |
+ 6 |
+ 7 |
+ 8 |
+ :call setline(1, range(30)) |
+ ]])
+ feed([[:tabnew<cr><C-w>-<C-w>-gtgt]])
+ screen:expect([[
+ + [No Name] [No Name] X|
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ 6 |
+ 7 |
+ |
+ ]])
+ end)
+
+ it('prints every executed Ex command if verbose >= 16', function()
+ local screen = Screen.new(60, 12)
+ screen:attach()
+ source([[
+ command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v
+ call feedkeys("\r", 't') " for the hit-enter prompt
+ set verbose=20
+ ]])
+ feed_command('DoSomething')
+ screen:expect([[
+ |
+ ~ |
+ ~ |
+ |
+ Executing: DoSomething |
+ Executing: echo 'hello' |set ts=4 |let v = '123' |echo v |
+ hello |
+ Executing: set ts=4 |let v = '123' |echo v |
+ Executing: let v = '123' |echo v |
+ Executing: echo v |
+ 123 |
+ Press ENTER or type command to continue^ |
+ ]])
+ end)
+end)
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 01f0d8a4d7..21c01b3458 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -3,7 +3,6 @@ local Screen = require('test.functional.ui.screen')
local clear, feed = helpers.clear, helpers.feed
local source = helpers.source
local command = helpers.command
-local feed_command = helpers.feed_command
local function new_screen(opt)
local screen = Screen.new(25, 5)
@@ -843,34 +842,3 @@ describe('cmdline redraw', function()
]], unchanged=true}
end)
end)
-
-describe('cmdline', function()
- before_each(function()
- clear()
- end)
-
- it('prints every executed Ex command if verbose >= 16', function()
- local screen = Screen.new(50, 12)
- screen:attach()
- source([[
- command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v
- call feedkeys("\r", 't') " for the hit-enter prompt
- set verbose=20
- ]])
- feed_command('DoSomething')
- screen:expect([[
- |
- ~ |
- |
- Executing: DoSomething |
- Executing: echo 'hello' |set ts=4 |let v = '123' ||
- echo v |
- hello |
- Executing: set ts=4 |let v = '123' |echo v |
- Executing: let v = '123' |echo v |
- Executing: echo v |
- 123 |
- Press ENTER or type command to continue^ |
- ]])
- end)
-end)