aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-29 07:55:26 +0800
committerGitHub <noreply@github.com>2022-12-29 07:55:26 +0800
commit05b6dd6e5f543083ebca581506398a8c263a2db6 (patch)
tree99d845c96d0e815940be8d0529e19d0a0bcbd535
parentd0dd8d11bf596b9310afd465a723696ac348d83a (diff)
downloadrneovim-05b6dd6e5f543083ebca581506398a8c263a2db6.tar.gz
rneovim-05b6dd6e5f543083ebca581506398a8c263a2db6.tar.bz2
rneovim-05b6dd6e5f543083ebca581506398a8c263a2db6.zip
test(lsp): add a screen:expect() between insert() and feed_command() (#21577)
The insert() and feed_command() type a lot of text, with only one screen:expect() call after the feed_command() it may time out.
-rw-r--r--test/functional/plugin/lsp/semantic_tokens_spec.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp/semantic_tokens_spec.lua b/test/functional/plugin/lsp/semantic_tokens_spec.lua
index 547e34d12a..9c1ba86fe1 100644
--- a/test/functional/plugin/lsp/semantic_tokens_spec.lua
+++ b/test/functional/plugin/lsp/semantic_tokens_spec.lua
@@ -307,6 +307,24 @@ describe('semantic token highlighting', function()
]])
insert(text)
+ screen:expect { grid = [[
+ #include <iostream> |
+ |
+ int {8:main}() |
+ { |
+ int {7:x}; |
+ #ifdef {5:__cplusplus} |
+ {4:std}::{2:cout} << {2:x} << "\n"; |
+ {6:#else} |
+ {6: printf("%d\n", x);} |
+ {6:#endif} |
+ } |
+ ^} |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]] }
feed_command('%s/int x/int x()/')
feed_command('noh')
screen:expect { grid = [[