test(windows): unskip working tests (#25153)

Also simplify home detection with os_homedir()
This commit is contained in:
dundargoc 2023-09-15 10:33:26 +02:00 committed by GitHub
parent a6e4793baf
commit 2d9e7a33f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -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'

View File

@ -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