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 clear = helpers.clear
|
||||||
local command, expect = helpers.command, helpers.expect
|
local command, expect = helpers.command, helpers.expect
|
||||||
|
|
||||||
if helpers.pending_win32(pending) then return end
|
|
||||||
|
|
||||||
describe('glob() and globpath()', function()
|
describe('glob() and globpath()', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
setup(function()
|
setup(function()
|
||||||
os.execute("mkdir -p sautest/autoload")
|
if helpers.iswin() then
|
||||||
os.execute("touch sautest/autoload/Test104.vim")
|
os.execute("md sautest\\autoload")
|
||||||
os.execute("touch sautest/autoload/footest.vim")
|
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)
|
end)
|
||||||
|
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
@ -24,29 +28,55 @@ describe('glob() and globpath()', function()
|
|||||||
-- Consistent sorting of file names
|
-- Consistent sorting of file names
|
||||||
command('set nofileignorecase')
|
command('set nofileignorecase')
|
||||||
|
|
||||||
command([[$put =glob('Xxx\{')]])
|
if helpers.iswin() then
|
||||||
command([[$put =glob('Xxx\$')]])
|
command([[$put =glob('Xxx{')]])
|
||||||
|
command([[$put =glob('Xxx$')]])
|
||||||
|
|
||||||
command('silent w! Xxx{')
|
command('silent w! Xxx{')
|
||||||
command([[w! Xxx\$]])
|
command([[w! Xxx$]])
|
||||||
command([[$put =glob('Xxx\{')]])
|
command([[$put =glob('Xxx{')]])
|
||||||
command([[$put =glob('Xxx\$')]])
|
command([[$put =glob('Xxx$')]])
|
||||||
|
|
||||||
command("$put =string(globpath('sautest/autoload', '*.vim'))")
|
command([[$put =string(globpath('sautest\autoload', '*.vim'))]])
|
||||||
command("$put =string(globpath('sautest/autoload', '*.vim', 0, 1))")
|
command([[$put =string(globpath('sautest\autoload', '*.vim', 0, 1))]])
|
||||||
|
expect([=[
|
||||||
expect([=[
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Xxx{
|
Xxx{
|
||||||
Xxx$
|
Xxx$
|
||||||
'sautest/autoload/Test104.vim
|
'sautest\autoload\Test104.vim
|
||||||
sautest/autoload/footest.vim'
|
sautest\autoload\footest.vim'
|
||||||
['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\$')]])
|
||||||
|
|
||||||
|
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']]=])
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
teardown(function()
|
teardown(function()
|
||||||
os.execute("rm -rf sautest Xxx{ Xxx$")
|
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)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user