search_mbyte_spec.lua 622 B

1234567891011121314151617181920212223242526272829303132
  1. local helpers = require('test.functional.helpers')(after_each)
  2. local poke_eventloop = helpers.poke_eventloop
  3. local clear = helpers.clear
  4. local insert = helpers.insert
  5. local expect = helpers.expect
  6. local command = helpers.command
  7. describe('search_mbyte', function()
  8. before_each(clear)
  9. it("search('multi-byte char', 'bce')", function()
  10. insert([=[
  11. Results:
  12. Test bce:
  13. A]=])
  14. poke_eventloop()
  15. command('/^Test bce:/+1')
  16. command([[$put =search('A', 'bce', line('.'))]])
  17. -- Assert buffer contents.
  18. expect([=[
  19. Results:
  20. Test bce:
  21. 4]=])
  22. end)
  23. end)