aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/treesitter_spec.lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-09-01 13:24:59 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2020-09-06 10:30:40 +0200
commitdc579c420bf11654d08572811da29daa26297006 (patch)
tree13bea2faf01366dbcd1d5194cf27e3e3be0f8b41 /test/functional/lua/treesitter_spec.lua
parent20c1526552f4f402e4acb24486da9f05d9344741 (diff)
downloadrneovim-dc579c420bf11654d08572811da29daa26297006.tar.gz
rneovim-dc579c420bf11654d08572811da29daa26297006.tar.bz2
rneovim-dc579c420bf11654d08572811da29daa26297006.zip
treesitter: Use excplicit names in tests
Diffstat (limited to 'test/functional/lua/treesitter_spec.lua')
-rw-r--r--test/functional/lua/treesitter_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/lua/treesitter_spec.lua b/test/functional/lua/treesitter_spec.lua
index c041478af6..2c386e2be0 100644
--- a/test/functional/lua/treesitter_spec.lua
+++ b/test/functional/lua/treesitter_spec.lua
@@ -250,13 +250,13 @@ void ui_refresh(void)
}, res)
end)
- it('allow loading query with escaped quotes and capture them with `match?` and `vim-match?`', function()
+ it('allow loading query with escaped quotes and capture them with `lua-match?` and `vim-match?`', function()
if not check_parser() then return end
insert('char* astring = "Hello World!";')
local res = exec_lua([[
- cquery = vim.treesitter.parse_query("c", '((_) @quote (vim-match? @quote "^\\"$")) ((_) @quote (match? @quote "^\\"$"))')
+ cquery = vim.treesitter.parse_query("c", '((_) @quote (vim-match? @quote "^\\"$")) ((_) @quote (lua-match? @quote "^\\"$"))')
parser = vim.treesitter.get_parser(0, "c")
tree = parser:parse()
res = {}
@@ -373,7 +373,7 @@ static int nlua_schedule(lua_State *const lstate)
; Use lua regexes
((identifier) @Identifier (#contains? @Identifier "lua_"))
-((identifier) @Constant (#match? @Constant "^[A-Z_]+$"))
+((identifier) @Constant (#lua-match? @Constant "^[A-Z_]+$"))
((identifier) @Normal (#vim-match? @Constant "^lstate$"))
((binary_expression left: (identifier) @WarningMsg.left right: (identifier) @WarningMsg.right) (#eq? @WarningMsg.left @WarningMsg.right))