aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/startup_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-17 23:19:59 +0200
committerGitHub <noreply@github.com>2018-06-17 23:19:59 +0200
commitc1c14faad935c7928779e93ebd6c827ac53ce2db (patch)
tree165ff97f2e0f2f0944af1dc37bfec6bdf71794b3 /test/functional/core/startup_spec.lua
parent3cc350696576f26fe1e978ef78125a1a6c7410ab (diff)
parent487cf98c0b61ade023fc71d945a64e61f8374eac (diff)
downloadrneovim-c1c14faad935c7928779e93ebd6c827ac53ce2db.tar.gz
rneovim-c1c14faad935c7928779e93ebd6c827ac53ce2db.tar.bz2
rneovim-c1c14faad935c7928779e93ebd6c827ac53ce2db.zip
Merge #8520 'Ex mode: always "improved" (gQ)'
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r--test/functional/core/startup_spec.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index f323056179..ae5e2b4115 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -123,9 +123,19 @@ describe('startup', function()
end)
it('-e/-E interactive #7679', function()
- clear('-E')
+ clear('-e')
local screen = Screen.new(25, 3)
screen:attach()
+ feed("put ='from -e'<CR>")
+ screen:expect([[
+ :put ='from -e' |
+ from -e |
+ :^ |
+ ]])
+
+ clear('-E')
+ screen = Screen.new(25, 3)
+ screen:attach()
feed("put ='from -E'<CR>")
screen:expect([[
:put ='from -E' |
@@ -147,6 +157,14 @@ describe('startup', function()
eq(inputstr,
funcs.system({nvim_prog, '-i', 'NONE', '-Es', '+%print', '-' },
input))
+ -- with `-u NORC`
+ eq('thepartycontinues\n',
+ funcs.system({nvim_prog, '-n', '-u', 'NORC', '-Es', '+.print' },
+ { 'thepartycontinues', '' }))
+ -- without `-u`
+ eq('thepartycontinues\n',
+ funcs.system({nvim_prog, '-n', '-Es', '+.print' },
+ { 'thepartycontinues', '' }))
--
-- -es: read stdin as ex-commands
@@ -157,6 +175,14 @@ describe('startup', function()
eq('line1\nline2\n',
funcs.system({nvim_prog, '-i', 'NONE', '-es', '-' },
input))
+ -- with `-u NORC`
+ eq(' encoding=utf-8\n',
+ funcs.system({nvim_prog, '-n', '-u', 'NORC', '-es' },
+ { 'set encoding', '' }))
+ -- without `-u`
+ eq(' encoding=utf-8\n',
+ funcs.system({nvim_prog, '-n', '-es' },
+ { 'set encoding', '' }))
end)
end)