From dc579c420bf11654d08572811da29daa26297006 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Tue, 1 Sep 2020 13:24:59 +0200 Subject: treesitter: Use excplicit names in tests --- test/functional/lua/treesitter_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/lua') 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)) -- cgit From b397f31eded2efaaf333308acb52586f3aea4fa5 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 6 Sep 2020 10:33:13 +0200 Subject: tests: update query.list_predicates() test --- test/functional/lua/treesitter_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/lua') diff --git a/test/functional/lua/treesitter_spec.lua b/test/functional/lua/treesitter_spec.lua index 2c386e2be0..5bca42a4fc 100644 --- a/test/functional/lua/treesitter_spec.lua +++ b/test/functional/lua/treesitter_spec.lua @@ -323,7 +323,7 @@ void ui_refresh(void) return list ]] - eq({ 'contains?', 'eq?', 'is-main?', 'match?', 'vim-match?' }, res_list) + eq({ 'contains?', 'eq?', 'is-main?', 'lua-match?', 'match?', 'vim-match?' }, res_list) end) it('supports highlighting', function() -- cgit