diff options
| author | emmanueltouzery <etouzery@gmail.com> | 2022-09-09 14:06:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-09 20:06:57 +0800 |
| commit | 8e65dbb6e187604cdaf0e0ef2e90c790760912e7 (patch) | |
| tree | 2fc78bea7a3c1045034a75f14b5e629ff91553d3 /test/lspconfig_spec.lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar.gz nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar.bz2 nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar.lz nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar.xz nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.tar.zst nvim-lspconfig-8e65dbb6e187604cdaf0e0ef2e90c790760912e7.zip | |
fix: escape wildcards patterns when calling glob (#2111) (#2122)
Diffstat (limited to 'test/lspconfig_spec.lua')
| -rw-r--r-- | test/lspconfig_spec.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lspconfig_spec.lua b/test/lspconfig_spec.lua index 8cea4a54..b899c09d 100644 --- a/test/lspconfig_spec.lua +++ b/test/lspconfig_spec.lua @@ -18,6 +18,22 @@ end) describe('lspconfig', function() describe('util', function() describe('path', function() + describe('escape_wildcards', function() + it('doesnt escape if not needed', function() + ok(exec_lua [[ + local lspconfig = require("lspconfig") + + return lspconfig.util.path.escape_wildcards('/usr/local/test/fname.lua') == '/usr/local/test/fname.lua' + ]]) + end) + it('escapes if needed', function() + ok(exec_lua [[ + local lspconfig = require("lspconfig") + + return lspconfig.util.path.escape_wildcards('/usr/local/test/[sq brackets] fname?*.lua') == '/usr/local/test/\\[sq brackets\\] fname\\?\\*.lua' + ]]) + end) + end) describe('exists', function() it('is present directory', function() ok(exec_lua [[ |
