aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/fold_spec.lua
diff options
context:
space:
mode:
authorGuilherme Soares <48023091+guilhas07@users.noreply.github.com>2025-01-13 09:41:49 +0000
committerGitHub <noreply@github.com>2025-01-13 01:41:49 -0800
commita3ef29d570dd892a1bcbfa80bb242d4aac89a06e (patch)
tree6643bcc47e622b8db286d281568c6cc04a20389c /test/functional/treesitter/fold_spec.lua
parent2c16c849986794682a4776ff4ec100d00eeba5ca (diff)
downloadrneovim-a3ef29d570dd892a1bcbfa80bb242d4aac89a06e.tar.gz
rneovim-a3ef29d570dd892a1bcbfa80bb242d4aac89a06e.tar.bz2
rneovim-a3ef29d570dd892a1bcbfa80bb242d4aac89a06e.zip
test: use temp file #31907
Diffstat (limited to 'test/functional/treesitter/fold_spec.lua')
-rw-r--r--test/functional/treesitter/fold_spec.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/treesitter/fold_spec.lua b/test/functional/treesitter/fold_spec.lua
index 9f7fdf529f..ac58df4bba 100644
--- a/test/functional/treesitter/fold_spec.lua
+++ b/test/functional/treesitter/fold_spec.lua
@@ -802,9 +802,10 @@ t2]])
end)
it('can detect a new parser and refresh folds accordingly', function()
- write_file('test_fold_file.txt', test_text)
+ local name = t.tmpname()
+ write_file(name, test_text)
+ command('edit ' .. name)
command [[
- e test_fold_file.txt
set filetype=some_filetype_without_treesitter_parser
set foldmethod=expr foldexpr=v:lua.vim.treesitter.foldexpr() foldcolumn=1 foldlevel=0
]]
@@ -818,7 +819,7 @@ t2]])
-- reload buffer as c filetype to simulate new parser being found
feed('GA// vim: ft=c<Esc>')
- command([[w | e]])
+ command([[write | edit]])
eq({
[1] = '>1',