mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
win: enable legacy test 097
This commit is contained in:
parent
0fd899aa07
commit
bde32edefe
@ -6,15 +6,19 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear = helpers.clear
|
||||
local command, expect = helpers.command, helpers.expect
|
||||
|
||||
if helpers.pending_win32(pending) then return end
|
||||
|
||||
describe('glob() and globpath()', function()
|
||||
setup(clear)
|
||||
|
||||
setup(function()
|
||||
if helpers.iswin() then
|
||||
os.execute("md sautest\\autoload")
|
||||
os.execute(".>sautest\\autoload\\Test104.vim 2>nul")
|
||||
os.execute(".>sautest\\autoload\\footest.vim 2>nul")
|
||||
else
|
||||
os.execute("mkdir -p sautest/autoload")
|
||||
os.execute("touch sautest/autoload/Test104.vim")
|
||||
os.execute("touch sautest/autoload/footest.vim")
|
||||
end
|
||||
end)
|
||||
|
||||
it('is working', function()
|
||||
@ -24,6 +28,27 @@ describe('glob() and globpath()', function()
|
||||
-- Consistent sorting of file names
|
||||
command('set nofileignorecase')
|
||||
|
||||
if helpers.iswin() then
|
||||
command([[$put =glob('Xxx{')]])
|
||||
command([[$put =glob('Xxx$')]])
|
||||
|
||||
command('silent w! Xxx{')
|
||||
command([[w! Xxx$]])
|
||||
command([[$put =glob('Xxx{')]])
|
||||
command([[$put =glob('Xxx$')]])
|
||||
|
||||
command([[$put =string(globpath('sautest\autoload', '*.vim'))]])
|
||||
command([[$put =string(globpath('sautest\autoload', '*.vim', 0, 1))]])
|
||||
expect([=[
|
||||
|
||||
|
||||
|
||||
Xxx{
|
||||
Xxx$
|
||||
'sautest\autoload\Test104.vim
|
||||
sautest\autoload\footest.vim'
|
||||
['sautest\autoload\Test104.vim', 'sautest\autoload\footest.vim']]=])
|
||||
else
|
||||
command([[$put =glob('Xxx\{')]])
|
||||
command([[$put =glob('Xxx\$')]])
|
||||
|
||||
@ -34,7 +59,6 @@ describe('glob() and globpath()', function()
|
||||
|
||||
command("$put =string(globpath('sautest/autoload', '*.vim'))")
|
||||
command("$put =string(globpath('sautest/autoload', '*.vim', 0, 1))")
|
||||
|
||||
expect([=[
|
||||
|
||||
|
||||
@ -44,9 +68,15 @@ describe('glob() and globpath()', function()
|
||||
'sautest/autoload/Test104.vim
|
||||
sautest/autoload/footest.vim'
|
||||
['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim']]=])
|
||||
end
|
||||
end)
|
||||
|
||||
teardown(function()
|
||||
if helpers.iswin() then
|
||||
os.execute('del /q/f Xxx{ Xxx$')
|
||||
os.execute('rd /q sautest')
|
||||
else
|
||||
os.execute("rm -rf sautest Xxx{ Xxx$")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user