aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/search_mbyte_spec.lua
blob: 632d95b444ce522a1d633c9e8326869c64811766 (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
local t = require('test.functional.testutil')()

local poke_eventloop = t.poke_eventloop
local clear = t.clear
local insert = t.insert
local expect = t.expect
local command = t.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:

      4]=])
  end)
end)