2024-04-20 08:44:13 -07:00
|
|
|
|
local n = require('test.functional.testnvim')()
|
2017-04-08 14:12:26 -07:00
|
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
|
local poke_eventloop = n.poke_eventloop
|
|
|
|
|
local clear = n.clear
|
|
|
|
|
local insert = n.insert
|
|
|
|
|
local expect = n.expect
|
|
|
|
|
local command = n.command
|
2016-01-30 13:36:33 -07:00
|
|
|
|
|
|
|
|
|
describe('search_mbyte', function()
|
2016-02-01 00:52:24 -07:00
|
|
|
|
before_each(clear)
|
2016-01-30 13:36:33 -07:00
|
|
|
|
|
2016-02-14 23:46:04 -07:00
|
|
|
|
it("search('multi-byte char', 'bce')", function()
|
2016-01-30 13:36:33 -07:00
|
|
|
|
insert([=[
|
|
|
|
|
Results:
|
2017-04-08 14:12:26 -07:00
|
|
|
|
|
2016-01-30 13:36:33 -07:00
|
|
|
|
Test bce:
|
|
|
|
|
A]=])
|
2020-10-19 11:17:51 -07:00
|
|
|
|
poke_eventloop()
|
2016-01-30 13:36:33 -07:00
|
|
|
|
|
2017-04-08 14:12:26 -07:00
|
|
|
|
command('/^Test bce:/+1')
|
|
|
|
|
command([[$put =search('A', 'bce', line('.'))]])
|
2016-01-30 13:36:33 -07:00
|
|
|
|
|
|
|
|
|
-- Assert buffer contents.
|
|
|
|
|
expect([=[
|
|
|
|
|
Results:
|
2017-04-08 14:12:26 -07:00
|
|
|
|
|
2016-01-30 13:36:33 -07:00
|
|
|
|
Test bce:
|
|
|
|
|
A
|
|
|
|
|
4]=])
|
|
|
|
|
end)
|
|
|
|
|
end)
|