diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/core/startup_spec.lua | 13 | ||||
-rw-r--r-- | test/functional/helpers.lua | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index d15faaf0a9..f1f96ba626 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -4,6 +4,7 @@ local Screen = require('test.functional.ui.screen') local clear = helpers.clear local command = helpers.command local eq = helpers.eq +local feed = helpers.feed local funcs = helpers.funcs local nvim_prog = helpers.nvim_prog local nvim_set = helpers.nvim_set @@ -121,6 +122,18 @@ describe('startup', function() { 'ohyeah', '' })) end) + it('-e/-E interactive #7679', function() + clear('-E') + local screen = Screen.new(25, 3) + screen:attach() + feed("put ='from -E'<CR>") + screen:expect([[ + | + from -E | + :^ | + ]]) + end) + it('stdin with -es/-Es #7679', function() local input = { 'append', 'line1', 'line2', '.', '%print', '' } local inputstr = table.concat(input, '\n') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 9895281773..a6d2764187 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -316,6 +316,14 @@ local function retry(max, max_ms, fn) end end +-- Starts a new global Nvim session. +-- Parameters are interpreted as startup args, OR a map with these keys: +-- args: Merged with the default `nvim_argv` set. +-- env : Defines the environment of the new session. +-- +-- Example: +-- clear('-e') +-- clear({args={'-e'}, env={TERM=term}}) local function clear(...) local args = {unpack(nvim_argv)} local new_args |