diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/editor/mode_normal_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/editor/mode_normal_spec.lua b/test/functional/editor/mode_normal_spec.lua index b3ef4866dc..cca244e06c 100644 --- a/test/functional/editor/mode_normal_spec.lua +++ b/test/functional/editor/mode_normal_spec.lua @@ -9,6 +9,7 @@ local feed = n.feed local fn = n.fn local command = n.command local eq = t.eq +local api = n.api describe('Normal mode', function() before_each(clear) @@ -41,4 +42,23 @@ describe('Normal mode', function() attr_ids = {}, }) end) + + it('replacing with ZWJ emoji sequences', function() + local screen = Screen.new(30, 8) + screen:attach() + api.nvim_buf_set_lines(0, 0, -1, true, { 'abcdefg' }) + feed('05rπ§βπΎ') -- ZWJ + screen:expect([[ + π§βπΎπ§βπΎπ§βπΎπ§βπΎ^π§βπΎfg | + {1:~ }|*6 + | + ]]) + + feed('2rπ³οΈββ§οΈ') -- ZWJ and variant selectors + screen:expect([[ + π§βπΎπ§βπΎπ§βπΎπ§βπΎπ³οΈββ§οΈ^π³οΈββ§οΈg | + {1:~ }|*6 + | + ]]) + end) end) |