2024-04-09 04:26:16 -07:00
|
|
|
|
local t = require('test.functional.testutil')()
|
2017-04-08 14:12:26 -07:00
|
|
|
|
|
2024-04-08 02:03:20 -07:00
|
|
|
|
local poke_eventloop = t.poke_eventloop
|
|
|
|
|
local clear = t.clear
|
|
|
|
|
local insert = t.insert
|
|
|
|
|
local expect = t.expect
|
|
|
|
|
local command = t.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)
|