]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Add the screen dump files and enable the tsserver auto-completion test
authorYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 23 Mar 2023 05:18:59 +0000 (22:18 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 23 Mar 2023 05:18:59 +0000 (22:18 -0700)
test/dumps/Test_tsserver_completion_1.dump [new file with mode: 0644]
test/dumps/Test_tsserver_completion_2.dump [new file with mode: 0644]
test/tsserver_tests.vim

diff --git a/test/dumps/Test_tsserver_completion_1.dump b/test/dumps/Test_tsserver_completion_1.dump
new file mode 100644 (file)
index 0000000..175c1dd
--- /dev/null
@@ -0,0 +1,10 @@
+|H+0#00e0003#ffffff0|>|c+0#af5f00255&|o|n|s|t| +0#0000000&|h|t@1|p| |=| |r|e|q|u|i|r|e|(|'+0#e000002&|h|t@1|p|'|)+0#0000000&| @44
+| +0#0000e05#a8a8a8255@1|h+0#0000000#ffffff0|t@1|p|.|c|r|e> @64
+|~+0#4040ff13&| @4| +0#0000001#ffd7ff255|c|r|e|a|t|e|S|e|r|v|e|r| |f| | +0#4040ff13#ffffff0@52
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62
diff --git a/test/dumps/Test_tsserver_completion_2.dump b/test/dumps/Test_tsserver_completion_2.dump
new file mode 100644 (file)
index 0000000..3b6ecab
--- /dev/null
@@ -0,0 +1,10 @@
+|H+0#00e0003#ffffff0|>|c+0#af5f00255&|o|n|s|t| +0#0000000&|h|t@1|p| |=| |r|e|q|u|i|r|e|(|'+0#e000002&|h|t@1|p|'|)+0#0000000&| @44
+| +0#0000e05#a8a8a8255@1|h+0#0000000#ffffff0|t@1|p|.|c|r> @65
+|~+0#4040ff13&| @4| +0#0000001#ffd7ff255|c|r|e|a|t|e|S|e|r|v|e|r| |f| | +0#4040ff13#ffffff0@52
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62
index 0ec17e61ef51dfae6b1cb510e9732922c14d0662..74a7431490f273d3b9fd6060672a584f8fabb3a5 100644 (file)
@@ -139,25 +139,25 @@ def g:Test_LspGoto()
   popup_clear()
 enddef
 
-# Test for auto-completion.  Make sure that only keywords that matches with the
-# keyword before the cursor are shown.
-def g:Test_LspCompletion1()
-  var lines =<< trim END
-    const http = require('http')
-    http.cr
-  END
-  writefile(lines, 'Xcompletion1.js', 'D')
-  var buf = g:RunVimInTerminal('--cmd "silent so start_tsserver.vim" Xcompletion1.js', {rows: 10, wait_for_ruler: 1})
-  sleep 5
-  term_sendkeys(buf, "GAe")
-  g:TermWait(buf)
-  g:VerifyScreenDump(buf, 'Test_tsserver_completion_1', {})
-  term_sendkeys(buf, "\<BS>")
-  g:TermWait(buf)
-  g:VerifyScreenDump(buf, 'Test_tsserver_completion_2', {})
-# 
-  g:StopVimInTerminal(buf)
-enddef
+# Test for auto-completion.  Make sure that only keywords that matches with the
+# keyword before the cursor are shown.
+def g:Test_LspCompletion1()
+  var lines =<< trim END
+    const http = require('http')
+    http.cr
+  END
+  writefile(lines, 'Xcompletion1.js', 'D')
+  var buf = g:RunVimInTerminal('--cmd "silent so start_tsserver.vim" Xcompletion1.js', {rows: 10, wait_for_ruler: 1})
+  sleep 5
+  term_sendkeys(buf, "GAe")
+  g:TermWait(buf)
+  g:VerifyScreenDump(buf, 'Test_tsserver_completion_1', {})
+  term_sendkeys(buf, "\<BS>")
+  g:TermWait(buf)
+  g:VerifyScreenDump(buf, 'Test_tsserver_completion_2', {})
+
+  g:StopVimInTerminal(buf)
+enddef
 
 # Start the typescript language server.  Returns true on success and false on
 # failure.