mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
ff470bb853
It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
62 lines
1.3 KiB
Lua
62 lines
1.3 KiB
Lua
local helpers = require('test.functional.helpers')(after_each)
|
|
local call = helpers.call
|
|
local clear = helpers.clear
|
|
local execute = helpers.execute
|
|
local expect = helpers.expect
|
|
local source = helpers.source
|
|
|
|
describe('Text object', function()
|
|
before_each(function()
|
|
clear()
|
|
execute('set shada=')
|
|
source([[
|
|
function SelectionOut(data)
|
|
new
|
|
call setline(1, a:data)
|
|
call setreg('"', '')
|
|
normal! ggfrmavi)y
|
|
$put =getreg('\"')
|
|
call setreg('"', '')
|
|
normal! `afbmavi)y
|
|
$put =getreg('\"')
|
|
call setreg('"', '')
|
|
normal! `afgmavi)y
|
|
$put =getreg('\"')
|
|
endfunction
|
|
]])
|
|
end)
|
|
|
|
it('Test for vi) without cpo-M', function()
|
|
execute('set cpo-=M')
|
|
call('SelectionOut', '(red \\(blue) green)')
|
|
|
|
expect([[
|
|
(red \(blue) green)
|
|
red \(blue
|
|
red \(blue
|
|
]])
|
|
end)
|
|
|
|
it('Test for vi) with cpo-M #1', function()
|
|
execute('set cpo+=M')
|
|
call('SelectionOut', '(red \\(blue) green)')
|
|
|
|
expect([[
|
|
(red \(blue) green)
|
|
red \(blue) green
|
|
blue
|
|
red \(blue) green]])
|
|
end)
|
|
|
|
it('Test for vi) with cpo-M #2', function()
|
|
execute('set cpo+=M')
|
|
call('SelectionOut', '(red (blue\\) green)')
|
|
|
|
expect([[
|
|
(red (blue\) green)
|
|
red (blue\) green
|
|
blue\
|
|
red (blue\) green]])
|
|
end)
|
|
end)
|