aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/language_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-06 10:10:01 +0200
committerGitHub <noreply@github.com>2022-09-06 10:10:01 +0200
commit5b8d6e0b3200c5cb9d98cbdb4ed0afe2b4edd38d (patch)
tree23aac48c4aff31236341260942ceeb7b42fc90ab /test/functional/treesitter/language_spec.lua
parent4bf005e9fdfb57397475b2663a3651faa83886ff (diff)
parent0822896efcf0da7002e323369fdc1e4a15ad1d57 (diff)
downloadrneovim-5b8d6e0b3200c5cb9d98cbdb4ed0afe2b4edd38d.tar.gz
rneovim-5b8d6e0b3200c5cb9d98cbdb4ed0afe2b4edd38d.tar.bz2
rneovim-5b8d6e0b3200c5cb9d98cbdb4ed0afe2b4edd38d.zip
Merge pull request #15391 from vigoux/ts-lua-builtin
feat(treesitter): highlighting for core languages, enabled for Lua
Diffstat (limited to 'test/functional/treesitter/language_spec.lua')
-rw-r--r--test/functional/treesitter/language_spec.lua12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/functional/treesitter/language_spec.lua b/test/functional/treesitter/language_spec.lua
index 8e9941d797..ed84dedb5a 100644
--- a/test/functional/treesitter/language_spec.lua
+++ b/test/functional/treesitter/language_spec.lua
@@ -6,7 +6,6 @@ local command = helpers.command
local exec_lua = helpers.exec_lua
local pcall_err = helpers.pcall_err
local matches = helpers.matches
-local pending_c_parser = helpers.pending_c_parser
local insert = helpers.insert
before_each(clear)
@@ -28,15 +27,11 @@ describe('treesitter language API', function()
eq("Error executing lua: .../language.lua:0: no parser for 'borklang' language, see :help treesitter-parsers",
pcall_err(exec_lua, "parser = vim.treesitter.inspect_language('borklang')"))
- if not pending_c_parser(pending) then
- matches("Error executing lua: Failed to load parser: uv_dlsym: .+",
- pcall_err(exec_lua, 'vim.treesitter.require_language("c", nil, false, "borklang")'))
- end
+ matches("Error executing lua: Failed to load parser: uv_dlsym: .+",
+ pcall_err(exec_lua, 'vim.treesitter.require_language("c", nil, false, "borklang")'))
end)
it('inspects language', function()
- if pending_c_parser(pending) then return end
-
local keys, fields, symbols = unpack(exec_lua([[
local lang = vim.treesitter.inspect_language('c')
local keys, symbols = {}, {}
@@ -76,7 +71,6 @@ describe('treesitter language API', function()
end)
it('checks if vim.treesitter.get_parser tries to create a new parser on filetype change', function ()
- if pending_c_parser(pending) then return end
command("set filetype=c")
-- Should not throw an error when filetype is c
eq('c', exec_lua("return vim.treesitter.get_parser(0):lang()"))
@@ -87,7 +81,6 @@ describe('treesitter language API', function()
end)
it('retrieve the tree given a range', function ()
- if pending_c_parser(pending) then return end
insert([[
int main() {
int x = 3;
@@ -102,7 +95,6 @@ describe('treesitter language API', function()
end)
it('retrieve the node given a range', function ()
- if pending_c_parser(pending) then return end
insert([[
int main() {
int x = 3;