diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-11-14 10:01:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 10:01:35 +0000 |
commit | e8cc489accc435076afb4fdf89778b64f0a48473 (patch) | |
tree | 78b5a74c13cefb916752f25cf42e301a400fcab2 /test/functional/lua/vim_spec.lua | |
parent | 5c5187c6f809c50e2cfd0ba04961ae8e0d2dabd0 (diff) | |
download | rneovim-e8cc489accc435076afb4fdf89778b64f0a48473.tar.gz rneovim-e8cc489accc435076afb4fdf89778b64f0a48473.tar.bz2 rneovim-e8cc489accc435076afb4fdf89778b64f0a48473.zip |
feat(test): add Lua forms for API methods (#20152)
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 38f772c5cf..6d0d87746c 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -168,8 +168,8 @@ describe('lua stdlib', function() for i,k in pairs(indicies16) do eq(k, exec_lua("return vim.str_byteindex(_G.test_text, ..., true)", i), i) end - matches(": index out of range$", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ...)", #indicies32 + 1)) - matches(": index out of range$", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ..., true)", #indicies16 + 1)) + eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ...)", #indicies32 + 1)) + eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ..., true)", #indicies16 + 1)) local i32, i16 = 0, 0 local len = 51 for k = 0,len do @@ -184,7 +184,7 @@ describe('lua stdlib', function() end eq({i32, i16}, exec_lua("return {vim.str_utfindex(_G.test_text, ...)}", k), k) end - matches(": index out of range$", pcall_err(exec_lua, "return vim.str_utfindex(_G.test_text, ...)", len + 1)) + eq("index out of range", pcall_err(exec_lua, "return vim.str_utfindex(_G.test_text, ...)", len + 1)) end) it("vim.str_utf_start", function() |