diff options
Diffstat (limited to 'test/functional/treesitter/fold_spec.lua')
-rw-r--r-- | test/functional/treesitter/fold_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/treesitter/fold_spec.lua b/test/functional/treesitter/fold_spec.lua index fc0996dd7f..06f97dc9bb 100644 --- a/test/functional/treesitter/fold_spec.lua +++ b/test/functional/treesitter/fold_spec.lua @@ -404,6 +404,28 @@ t3]]) }, get_fold_levels()) end) + it('handles quantified patterns', function() + insert([[ +import hello +import hello +import hello +import hello +import hello +import hello]]) + + exec_lua([[vim.treesitter.query.set('python', 'folds', '(import_statement)+ @fold')]]) + parse('python') + + eq({ + [1] = '>1', + [2] = '1', + [3] = '1', + [4] = '1', + [5] = '1', + [6] = '1', + }, get_fold_levels()) + end) + it('updates folds in all windows', function() local screen = Screen.new(60, 48) screen:attach() |