diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-02-08 15:11:56 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-02-10 22:28:12 +0100 |
commit | f75c4b39ece7b5f760892c1e18af449c5bb270c7 (patch) | |
tree | b06ad540c5829cfac6c6acc6f252a623c40f63f0 /test/functional/ui | |
parent | 01cdeff62656225ebbac237fb7c212d622ac43d3 (diff) | |
download | rneovim-f75c4b39ece7b5f760892c1e18af449c5bb270c7.tar.gz rneovim-f75c4b39ece7b5f760892c1e18af449c5bb270c7.tar.bz2 rneovim-f75c4b39ece7b5f760892c1e18af449c5bb270c7.zip |
shell: handle split-up UTF-8 sequences
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/output_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index 4e79c2e6cb..14f2091046 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -9,6 +9,7 @@ local feed_command = helpers.feed_command local iswin = helpers.iswin local clear = helpers.clear local command = helpers.command +local nvim_dir = helpers.nvim_dir describe("shell command :!", function() if helpers.pending_win32(pending) then return end @@ -195,5 +196,29 @@ describe("shell command :!", function() eq(true, screen.bell) end) end) + + it('handles multibyte sequences split over buffer boundaries', function() + command('cd '..nvim_dir) + local cmd + if iswin() then + cmd = '!shell-test UTF-8 ' + else + cmd = '!./shell-test UTF-8' + end + feed_command(cmd) + -- Note: only the first example of split composed char works + screen:expect([[ + {1:~ }| + {1:~ }| + :]]..cmd..[[ | + å | + ref: å̲ | + 1: å̲ | + 2: å ̲ | + 3: å ̲ | + | + {3:Press ENTER or type command to continue}^ | + ]]) + end) end) end) |