diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-05 23:56:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 23:56:33 +0200 |
commit | fd32a987520cb132455d61301467182cb58cddf2 (patch) | |
tree | 0cca9e6049d0ed957d1e0cd7aca09ec252012f3d /test/functional/lua/fs_spec.lua | |
parent | 2dfb51a2bea2d3306fcf46fe28835c9c04afc064 (diff) | |
download | rneovim-fd32a987520cb132455d61301467182cb58cddf2.tar.gz rneovim-fd32a987520cb132455d61301467182cb58cddf2.tar.bz2 rneovim-fd32a987520cb132455d61301467182cb58cddf2.zip |
test(vim.fs.normalize): enable test on Windows
Diffstat (limited to 'test/functional/lua/fs_spec.lua')
-rw-r--r-- | test/functional/lua/fs_spec.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/lua/fs_spec.lua b/test/functional/lua/fs_spec.lua index aeb2e5d9a6..2fcbc9450f 100644 --- a/test/functional/lua/fs_spec.lua +++ b/test/functional/lua/fs_spec.lua @@ -271,10 +271,11 @@ describe('vim.fs', function() eq('C:/Users/jdoe', exec_lua [[ return vim.fs.normalize('C:\\Users\\jdoe') ]]) end) it('works with ~', function() - if is_os('win') then - pending([[$HOME does not exist on Windows ¯\_(ツ)_/¯]]) - end - eq(os.getenv('HOME') .. '/src/foo', exec_lua [[ return vim.fs.normalize('~/src/foo') ]]) + eq( exec_lua([[ + local home = ... + return home .. '/src/foo' + ]], is_os('win') and vim.fs.normalize(os.getenv('USERPROFILE')) or os.getenv('HOME') + ) , exec_lua [[ return vim.fs.normalize('~/src/foo') ]]) end) it('works with environment variables', function() local xdg_config_home = test_build_dir .. '/.config' |