diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-07-25 10:16:33 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-17 16:20:39 +0200 |
commit | d879331b0dee66cb106b5bea9efc2f920caf9abd (patch) | |
tree | 05188f0b72e9aa7432f2f08516a6f239e491419f /test/functional/ui/screen.lua | |
parent | f7cfca49d6f1380b2ec0b0f7723ea308d0810857 (diff) | |
download | rneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.tar.gz rneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.tar.bz2 rneovim-d879331b0dee66cb106b5bea9efc2f920caf9abd.zip |
feat(ui): allow to set the highlight namespace per window
- reimplement 'winhl' in terms of highlight namespaces
- check for EOF in screen tests (to indicate a likely crash)
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index ea98705394..6ee9e7b393 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -546,7 +546,7 @@ function Screen:_wait(check, flags) return true end - run_session(self._session, flags.request_cb, notification_cb, nil, minimal_timeout) + local eof = run_session(self._session, flags.request_cb, notification_cb, nil, minimal_timeout) if not did_flush then err = "no flush received" elseif not checked then @@ -557,9 +557,9 @@ function Screen:_wait(check, flags) end end - if not success_seen then + if not success_seen and not eof then did_miminal_timeout = true - run_session(self._session, flags.request_cb, notification_cb, nil, timeout-minimal_timeout) + eof = run_session(self._session, flags.request_cb, notification_cb, nil, timeout-minimal_timeout) end local did_warn = false @@ -600,8 +600,10 @@ between asynchronous (feed(), nvim_input()) and synchronous API calls. if err then + if eof then err = err..'\n\n'..eof[2] end busted.fail(err, 3) elseif did_warn then + if eof then print(eof[2]) end local tb = debug.traceback() local index = string.find(tb, '\n%s*%[C]') print(string.sub(tb,1,index)) |