diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-07-14 07:57:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 07:57:13 +0800 |
commit | 9176b5e10a6b32ff65c8ba3f532e3bd55c168ec6 (patch) | |
tree | c6ad5b716b04547789d252bd2f70882f7d8fad4d /test/unit | |
parent | dbb840da01c72d8a311e0c55d3248d78a64b63a4 (diff) | |
download | rneovim-9176b5e10a6b32ff65c8ba3f532e3bd55c168ec6.tar.gz rneovim-9176b5e10a6b32ff65c8ba3f532e3bd55c168ec6.tar.bz2 rneovim-9176b5e10a6b32ff65c8ba3f532e3bd55c168ec6.zip |
fix(runtime): respect 'fileignorecase' when sourcing (#24344)
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/path_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua index 5808e2013a..f9ce1ff099 100644 --- a/test/unit/path_spec.lua +++ b/test/unit/path_spec.lua @@ -15,6 +15,7 @@ local mkdir = helpers.mkdir cimport('string.h') local cimp = cimport('./src/nvim/os/os.h', './src/nvim/path.h') +local options = cimport('./src/nvim/option_defs.h') local length = 0 local buffer = nil @@ -636,6 +637,15 @@ describe('path.c', function() eq(false, path_with_extension('/some/path/file.vim', 'lua')) eq(false, path_with_extension('/some/path/file', 'lua')) end) + + itp("respects 'fileignorecase' option", function() + options.p_fic = false + eq(false, path_with_extension('/some/path/file.VIM', 'vim')) + eq(false, path_with_extension('/some/path/file.LUA', 'lua')) + options.p_fic = true + eq(true, path_with_extension('/some/path/file.VIM', 'vim')) + eq(true, path_with_extension('/some/path/file.LUA', 'lua')) + end) end) describe('path_with_url', function() |