diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-01 18:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 18:54:50 +0100 |
commit | 72c22862dc2199462aef0d450a49d29a9d0680b9 (patch) | |
tree | 04954cbd59abc06ac1a82511f63329290e58c11a /test/unit | |
parent | f88c2490c7971e7f8889e60316ff3767b1a3f92c (diff) | |
parent | eb387ae53009b4da93fbbb3423e5ef01023dc32a (diff) | |
download | rneovim-72c22862dc2199462aef0d450a49d29a9d0680b9.tar.gz rneovim-72c22862dc2199462aef0d450a49d29a9d0680b9.tar.bz2 rneovim-72c22862dc2199462aef0d450a49d29a9d0680b9.zip |
Merge pull request #12235 from dm1try/add_init_lua
add init.lua as an alternative user config
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/path_spec.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua index 356c4997fa..41954de9be 100644 --- a/test/unit/path_spec.lua +++ b/test/unit/path_spec.lua @@ -603,4 +603,21 @@ describe('path.c', function() eq(FAIL, path_is_absolute('not/in/my/home~/directory')) end) end) + + describe('path_with_extension', function() + local function path_with_extension(filename, extension) + local c_filename = to_cstr(filename) + local c_extension = to_cstr(extension) + return cimp.path_with_extension(c_filename, c_extension) + end + + itp('returns true if filename includes a provided extension', function() + eq(true, path_with_extension('/some/path/file.lua', 'lua')) + end) + + itp('returns false if filename does not include a provided extension', function() + eq(false, path_with_extension('/some/path/file.vim', 'lua')) + eq(false, path_with_extension('/some/path/file', 'lua')) + end) + end) end) |