diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-13 18:05:57 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-13 21:21:20 -0300 |
commit | ea771ac559054c138cda58e68daeb286f5c80e80 (patch) | |
tree | 3355d723a0c1411309abf4f0d9dfeba143275a05 | |
parent | 8bff79d3fd76c849e871925fc5d9f1c3c8049031 (diff) | |
download | rneovim-ea771ac559054c138cda58e68daeb286f5c80e80.tar.gz rneovim-ea771ac559054c138cda58e68daeb286f5c80e80.tar.bz2 rneovim-ea771ac559054c138cda58e68daeb286f5c80e80.zip |
test: Add Screen.debug for inspecting screens of hanging tests
-rw-r--r-- | test/functional/ui/screen.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 7e8811fe2f..4163d8011a 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -83,6 +83,21 @@ local eq, dedent = helpers.eq, helpers.dedent local Screen = {} Screen.__index = Screen +local debug_screen + + +function Screen.debug(command) + if not command then + command = 'pynvim -n -g -c ' + end + command = command .. request('vim_eval', '$NVIM_LISTEN_ADDRESS') + if debug_screen then + debug_screen:close() + end + debug_screen = io.popen(command, 'r') + debug_screen:read() +end + function Screen.new(width, height) if not width then width = 53 |