diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-07-01 15:29:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-01 15:29:20 +0200 |
commit | ef9ef75a7b1e29002745d596e31a1d5ecff1be89 (patch) | |
tree | 11026785224fb64c4a524f87d66a1ef71ec30db7 /test | |
parent | 22d95e462ec32e1b6c28b310e80c9c001edc0fe1 (diff) | |
parent | 3e4a058b01db779e087eaf97826cee545de2a923 (diff) | |
download | rneovim-ef9ef75a7b1e29002745d596e31a1d5ecff1be89.tar.gz rneovim-ef9ef75a7b1e29002745d596e31a1d5ecff1be89.tar.bz2 rneovim-ef9ef75a7b1e29002745d596e31a1d5ecff1be89.zip |
Merge #8635 from janlazo/vim-8.0.0252
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mbyte_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/mbyte_spec.lua b/test/unit/mbyte_spec.lua index 6feef4e601..1e7e9fd6e6 100644 --- a/test/unit/mbyte_spec.lua +++ b/test/unit/mbyte_spec.lua @@ -5,6 +5,7 @@ local ffi = helpers.ffi local eq = helpers.eq local mbyte = helpers.cimport("./src/nvim/mbyte.h") +local charset = helpers.cimport('./src/nvim/charset.h') describe('mbyte', function() @@ -42,6 +43,15 @@ describe('mbyte', function() -- Sequences with more than four bytes end) + itp('utf_char2bytes', function() + local char_p = ffi.typeof('char[?]') + for c = 0, 0xFFFF do + local p = char_p(4, 0) + mbyte.utf_char2bytes(c, p) + eq(c, mbyte.utf_ptr2char(p)) + eq(charset.vim_iswordc(c), charset.vim_iswordp(p)) + end + end) describe('utfc_ptr2char_len', function() |