]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Do not rely on vim's locale in tests
authorMagnus Groß <magnus@mggross.com>
Tue, 11 Jul 2023 17:40:38 +0000 (19:40 +0200)
committerMagnus Groß <magnus@mggross.com>
Tue, 11 Jul 2023 17:40:38 +0000 (19:40 +0200)
The language of the user running the tests may be different, which means
that the error message may be different as it is translated.

Instead match only against the error code, which is safer.

test/clangd_tests.vim

index 5e18f94e888cadbbb7db9d1277e91df23d9ba043..54c5adeb033f765161b41c840501bb1734ed6158 100644 (file)
@@ -1343,7 +1343,7 @@ def g:Test_LspTagFunc()
   :exe "normal \<C-]>"
   assert_equal([11, 6], [line('.'), col('.')])
   cursor(1, 1)
-  assert_fails('exe "normal \<C-]>"', 'E433: No tags file')
+  assert_fails('exe "normal \<C-]>"', 'E433:')
 
   :set tagfunc&
   :%bw!