diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/treesitter/query_spec.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/functional/treesitter/query_spec.lua b/test/functional/treesitter/query_spec.lua index dfb5eb2685..634f8af83d 100644 --- a/test/functional/treesitter/query_spec.lua +++ b/test/functional/treesitter/query_spec.lua @@ -722,7 +722,25 @@ void ui_refresh(void) eq(exp, pcall_err(exec_lua, "vim.treesitter.query.parse('c', ...)", cquery)) end - -- Invalid node type + -- Invalid node types + test( + '.../query.lua:0: Query error at 1:2. Invalid node type ">\\">>":\n' + .. '">\\">>" @operator\n' + .. ' ^', + '">\\">>" @operator' + ) + test( + '.../query.lua:0: Query error at 1:2. Invalid node type "\\\\":\n' + .. '"\\\\" @operator\n' + .. ' ^', + '"\\\\" @operator' + ) + test( + '.../query.lua:0: Query error at 1:2. Invalid node type ">>>":\n' + .. '">>>" @operator\n' + .. ' ^', + '">>>" @operator' + ) test( '.../query.lua:0: Query error at 1:2. Invalid node type "dentifier":\n' .. '(dentifier) @variable\n' |