aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua')
-rw-r--r--test/functional/lua/treesitter_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/lua/treesitter_spec.lua b/test/functional/lua/treesitter_spec.lua
index aa3d55b06d..fed854a951 100644
--- a/test/functional/lua/treesitter_spec.lua
+++ b/test/functional/lua/treesitter_spec.lua
@@ -15,14 +15,14 @@ before_each(clear)
describe('treesitter API', function()
-- error tests not requiring a parser library
it('handles missing language', function()
- eq("Error executing lua: .../treesitter.lua: no parser for 'borklang' language",
- pcall_err(exec_lua, "parser = vim.treesitter.create_parser(0, 'borklang')"))
+ eq("Error executing lua: .../language.lua: no parser for 'borklang' language, see :help treesitter-parsers",
+ pcall_err(exec_lua, "parser = vim.treesitter.get_parser(0, 'borklang')"))
-- actual message depends on platform
matches("Error executing lua: Failed to load parser: uv_dlopen: .+",
pcall_err(exec_lua, "parser = vim.treesitter.require_language('borklang', 'borkbork.so')"))
- eq("Error executing lua: .../treesitter.lua: no parser for 'borklang' language",
+ eq("Error executing lua: .../language.lua: no parser for 'borklang' language, see :help treesitter-parsers",
pcall_err(exec_lua, "parser = vim.treesitter.inspect_language('borklang')"))
end)
@@ -246,7 +246,7 @@ static int nlua_schedule(lua_State *const lstate)
; defaults to very magic syntax, for best compatibility
((identifier) @Identifier (#match? @Identifier "^l(u)a_"))
; still support \M etc prefixes
-((identifier) @Constant (#match? @Constant "\M^\[A-Z_]\+$"))
+((identifier) @Constant (#match? @Constant "^[A-Z_]+$"))
((binary_expression left: (identifier) @WarningMsg.left right: (identifier) @WarningMsg.right) (#eq? @WarningMsg.left @WarningMsg.right))
@@ -292,9 +292,9 @@ static int nlua_schedule(lua_State *const lstate)
]]}
exec_lua([[
- local TSHighlighter = vim.treesitter.TSHighlighter
+ local highlighter = vim.treesitter.highlighter
local query = ...
- test_hl = TSHighlighter.new(query, 0, "c")
+ test_hl = highlighter.new(query, 0, "c")
]], hl_query)
screen:expect{grid=[[
{2:/// Schedule Lua callback on main loop's event queue} |