diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-31 11:50:22 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-31 11:50:39 -0300 |
commit | ad7a317c42b7eb4d27a888f217750a4f4bb67bc8 (patch) | |
tree | 6a2e7808d6064a556dfc81320775fddb79257b7c /test | |
parent | 27ead64da044f841515d52e273dc3f963e6c678c (diff) | |
parent | feca9624b8bec45ecd112aab8495143e8ed3e3a4 (diff) | |
download | rneovim-ad7a317c42b7eb4d27a888f217750a4f4bb67bc8.tar.gz rneovim-ad7a317c42b7eb4d27a888f217750a4f4bb67bc8.tar.bz2 rneovim-ad7a317c42b7eb4d27a888f217750a4f4bb67bc8.zip |
Merge PR #1212 'os_scandir/scandir_next/closedir()'
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/path_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua index 1824eaeccc..13546a6183 100644 --- a/test/unit/path_spec.lua +++ b/test/unit/path_spec.lua @@ -418,6 +418,30 @@ describe('more path function', function() end) end) + describe('path_fix_case', function() + function fix_case(file) + c_file = to_cstr(file) + path.path_fix_case(c_file) + return ffi.string(c_file) + end + + if ffi.os == 'Windows' or ffi.os == 'OSX' then + it('Corrects the case of file names in Mac and Windows', function() + lfs.mkdir('CamelCase') + eq('CamelCase', fix_case('camelcase')) + eq('CamelCase', fix_case('cAMELcASE')) + lfs.rmdir('CamelCase') + end) + else + it('does nothing on Linux', function() + lfs.mkdir('CamelCase') + eq('camelcase', fix_case('camelcase')) + eq('cAMELcASE', fix_case('cAMELcASE')) + lfs.mkdir('CamelCase') + end) + end + end) + describe('append_path', function() it('joins given paths with a slash', function() local path1 = cstr(100, 'path1') |