aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/path_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/core/path_spec.lua')
-rw-r--r--test/functional/core/path_spec.lua34
1 files changed, 29 insertions, 5 deletions
diff --git a/test/functional/core/path_spec.lua b/test/functional/core/path_spec.lua
index a786887bbd..6c677d76d1 100644
--- a/test/functional/core/path_spec.lua
+++ b/test/functional/core/path_spec.lua
@@ -6,16 +6,19 @@ local command = helpers.command
local insert = helpers.insert
local feed = helpers.feed
local is_os = helpers.is_os
+local mkdir = helpers.mkdir
+local rmdir = helpers.rmdir
+local write_file = helpers.write_file
+
+local function join_path(...)
+ local pathsep = (is_os('win') and '\\' or '/')
+ return table.concat({...}, pathsep)
+end
describe('path collapse', function()
local targetdir
local expected_path
- local function join_path(...)
- local pathsep = (is_os('win') and '\\' or '/')
- return table.concat({...}, pathsep)
- end
-
before_each(function()
targetdir = join_path('test', 'functional', 'fixtures')
clear()
@@ -57,6 +60,27 @@ describe('path collapse', function()
end)
end)
+describe('expand wildcard', function()
+ before_each(clear)
+
+ it('with special characters #24421', function()
+ local folders = is_os('win') and {
+ '{folder}',
+ 'folder$name'
+ } or {
+ 'folder-name',
+ 'folder#name'
+ }
+ for _, folder in ipairs(folders) do
+ mkdir(folder)
+ local file = join_path(folder, 'file.txt')
+ write_file(file, '')
+ eq(file, eval('expand("'..folder..'/*")'))
+ rmdir(folder)
+ end
+ end)
+end)
+
describe('file search', function()
before_each(clear)