mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
052498ed42
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
32 lines
577 B
Lua
32 lines
577 B
Lua
local n = require('test.functional.testnvim')()
|
||
|
||
local poke_eventloop = n.poke_eventloop
|
||
local clear = n.clear
|
||
local insert = n.insert
|
||
local expect = n.expect
|
||
local command = n.command
|
||
|
||
describe('search_mbyte', function()
|
||
before_each(clear)
|
||
|
||
it("search('multi-byte char', 'bce')", function()
|
||
insert([=[
|
||
Results:
|
||
|
||
Test bce:
|
||
A]=])
|
||
poke_eventloop()
|
||
|
||
command('/^Test bce:/+1')
|
||
command([[$put =search('A', 'bce', line('.'))]])
|
||
|
||
-- Assert buffer contents.
|
||
expect([=[
|
||
Results:
|
||
|
||
Test bce:
|
||
A
|
||
4]=])
|
||
end)
|
||
end)
|