blob: 832fc1c831de45de0956b79dbf612c5ef45861e5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-- Test for search('multi-byte char', 'bce')
local helpers = require('test.functional.helpers')
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
describe('search_mbyte', function()
before_each(clear)
it('is working', function()
insert([=[
Results:
Test bce:
A]=])
execute('source small.vim')
execute('source mbyte.vim')
execute('set encoding=utf-8')
execute('/^Test bce:/+1')
execute([[$put =search('A', 'bce', line('.'))]])
-- Assert buffer contents.
expect([=[
Results:
Test bce:
A
4]=])
end)
end)
|