diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-09-15 10:33:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 16:33:26 +0800 |
commit | 2d9e7a33f41c842521c74d45927cfcb1874c711b (patch) | |
tree | f9baf374f6299a467acf21b5a81853107b07ee9c | |
parent | a6e4793bafa0edda2ef5e948cd071dc9626688d8 (diff) | |
download | rneovim-2d9e7a33f41c842521c74d45927cfcb1874c711b.tar.gz rneovim-2d9e7a33f41c842521c74d45927cfcb1874c711b.tar.bz2 rneovim-2d9e7a33f41c842521c74d45927cfcb1874c711b.zip |
test(windows): unskip working tests (#25153)
Also simplify home detection with os_homedir()
-rw-r--r-- | test/functional/lua/fs_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/terminal/edit_spec.lua | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/functional/lua/fs_spec.lua b/test/functional/lua/fs_spec.lua index 2c7b3ff324..6bdb9ed79d 100644 --- a/test/functional/lua/fs_spec.lua +++ b/test/functional/lua/fs_spec.lua @@ -1,4 +1,5 @@ local helpers = require('test.functional.helpers')(after_each) +local uv = require('luv') local clear = helpers.clear local exec_lua = helpers.exec_lua @@ -288,11 +289,12 @@ describe('vim.fs', function() eq('/', exec_lua [[ return vim.fs.normalize('/') ]]) end) it('works with ~', function() - 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') ]]) + eq( + exec_lua([[ + local home = ... + return home .. '/src/foo' + ]], vim.fs.normalize(uv.os_homedir())), + exec_lua [[ return vim.fs.normalize('~/src/foo') ]]) end) it('works with environment variables', function() local xdg_config_home = test_build_dir .. '/.config' diff --git a/test/functional/terminal/edit_spec.lua b/test/functional/terminal/edit_spec.lua index db5dba7374..29361bc0fa 100644 --- a/test/functional/terminal/edit_spec.lua +++ b/test/functional/terminal/edit_spec.lua @@ -36,7 +36,6 @@ describe(':edit term://*', function() end) it("runs TermOpen early enough to set buffer-local 'scrollback'", function() - if helpers.skip(helpers.is_os('win')) then return end local columns, lines = 20, 4 local scr = get_screen(columns, lines) local rep = 97 |