File: search_mbyte_spec.lua

package info (click to toggle)
neovim 0.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 64,136 kB
  • sloc: ansic: 263,156; python: 1,472; lisp: 1,237; sh: 1,138; makefile: 378; xml: 83; ruby: 6
file content (31 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
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 n = require('test.functional.testnvim')()

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