diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2021-07-25 16:49:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 16:49:22 +0200 |
commit | 3a34f59ae8a68499f982af5bbaed51c1073b6de6 (patch) | |
tree | a8ec603c3c506457e8f818d00af421edceeb13e8 /test | |
parent | bebca7bbeb2cbd473acc4f3e11f8b612f8f7e0f4 (diff) | |
parent | 289c153d1f96678eb36af9bfabf90eedb9d8a72f (diff) | |
download | rneovim-3a34f59ae8a68499f982af5bbaed51c1073b6de6.tar.gz rneovim-3a34f59ae8a68499f982af5bbaed51c1073b6de6.tar.bz2 rneovim-3a34f59ae8a68499f982af5bbaed51c1073b6de6.zip |
Merge pull request #14347 from theHamsta/list_directives
treesitter: add query.list_directives
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/treesitter/parser_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index d2f9148e8f..d9df5fbc0d 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -646,6 +646,19 @@ int x = INT_MAX; {2, 29, 2, 68} -- READ_STRING_OK(x, y) (char_u *)read_string((x), (size_t)(y)) }, get_ranges()) end) + it("should list all directives", function() + local res_list = exec_lua[[ + local query = require'vim.treesitter.query' + + local list = query.list_directives() + + table.sort(list) + + return list + ]] + + eq({ 'offset!', 'set!' }, res_list) + end) end) end) |