vim-patch:7.4.952

Problem:    'lispwords' is tested in the old way.
Solution:   Make a new style test for 'lispwords'.

6cd1345307
This commit is contained in:
watiko
2016-02-22 22:21:37 +09:00
parent e71de26aba
commit f0add77de5
3 changed files with 26 additions and 48 deletions

View File

@@ -338,7 +338,7 @@ static int included_patches[] = {
955, 955,
// 954 NA // 954 NA
953, 953,
// 952, 952,
// 951, // 951,
950, 950,
949, 949,

View File

@@ -1,47 +0,0 @@
-- Tests for 'lispwords' setting being global-local
local helpers = require('test.functional.helpers')
local source = helpers.source
local clear, expect = helpers.clear, helpers.expect
describe('lispwords', function()
setup(clear)
it('global-local', function()
source([[
setglobal lispwords=foo,bar,baz
setlocal lispwords-=foo
setlocal lispwords+=quux
redir @A
echo "Testing 'lispwords' local value"
setglobal lispwords?
setlocal lispwords?
echo &lispwords
echo ''
redir end
setlocal lispwords<
redir @A
echo "Testing 'lispwords' value reset"
setglobal lispwords?
setlocal lispwords?
echo &lispwords
redir end
0put a
$d
]])
-- Assert buffer contents.
expect([[
Testing 'lispwords' local value
lispwords=foo,bar,baz
lispwords=bar,baz,quux
bar,baz,quux
Testing 'lispwords' value reset
lispwords=foo,bar,baz
lispwords=foo,bar,baz
foo,bar,baz]])
end)
end)

View File

@@ -0,0 +1,25 @@
local helpers = require('test.functional.helpers')
local clear = helpers.clear
local eq = helpers.eq
local eval = helpers.eval
local execute = helpers.execute
local source = helpers.source
describe('lispwords', function()
before_each(clear)
it('should be set global-local',function()
source([[
setglobal lispwords=foo,bar,baz
setlocal lispwords-=foo
setlocal lispwords+=quux]])
eq('foo,bar,baz', eval('&g:lispwords'))
eq('bar,baz,quux', eval('&l:lispwords'))
eq('bar,baz,quux', eval('&lispwords'))
execute('setlocal lispwords<')
eq('foo,bar,baz', eval('&g:lispwords'))
eq('foo,bar,baz', eval('&l:lispwords'))
eq('foo,bar,baz', eval('&lispwords'))
end)
end)