2016-04-23 16:53:11 -07:00
|
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2016-02-01 00:53:59 -07:00
|
|
|
|
local insert = helpers.insert
|
2016-01-30 13:36:33 -07:00
|
|
|
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
|
|
Test bce:
|
|
|
|
|
A]=])
|
|
|
|
|
|
|
|
|
|
execute('/^Test bce:/+1')
|
|
|
|
|
execute([[$put =search('A', 'bce', line('.'))]])
|
|
|
|
|
|
|
|
|
|
-- Assert buffer contents.
|
|
|
|
|
expect([=[
|
|
|
|
|
Results:
|
|
|
|
|
|
|
|
|
|
Test bce:
|
|
|
|
|
A
|
|
|
|
|
4]=])
|
|
|
|
|
end)
|
|
|
|
|
end)
|