]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Add tests for :LspDiag nextWrap/prevWrap
authorNick Jensen <nickspoon@gmail.com>
Mon, 8 Apr 2024 01:54:30 +0000 (13:54 +1200)
committerNick Jensen <nickspoon@gmail.com>
Mon, 8 Apr 2024 01:54:30 +0000 (13:54 +1200)
test/clangd_tests.vim

index 5ff6a4cfb3e01ab1a2f289ca6924bd9679135544..b084e8618728056f79378e1caf0f7d9ae06500a5 100644 (file)
@@ -511,6 +511,9 @@ def g:Test_LspDiag_Multi()
   var output = execute('LspDiag prev')->split("\n")
   assert_equal('Warn: No more diagnostics found', output[0])
 
+  assert_equal('', execute('LspDiag prevWrap'))
+  assert_equal([2, 9], [line('.'), col('.')])
+
   cursor(2, 1)
   assert_equal('', execute('LspDiag first'))
   assert_equal([1, 5], [line('.'), col('.')])
@@ -519,6 +522,10 @@ def g:Test_LspDiag_Multi()
   cursor(1, 1)
   assert_equal('', execute('LspDiag last'))
   assert_equal([2, 9], [line('.'), col('.')])
+  assert_equal('', execute('LspDiag nextWrap'))
+  assert_equal([1, 5], [line('.'), col('.')])
+  assert_equal('', execute('LspDiag nextWrap'))
+  assert_equal([1, 9], [line('.'), col('.')])
   popup_clear()
 
   # Test for :LspDiag here on a line with multiple diagnostics