neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit a3ef29d570dd892a1bcbfa80bb242d4aac89a06e
parent 2c16c849986794682a4776ff4ec100d00eeba5ca
Author: Guilherme Soares <48023091+guilhas07@users.noreply.github.com>
Date:   Mon, 13 Jan 2025 09:41:49 +0000

test: use temp file #31907


Diffstat:
Mtest/functional/treesitter/fold_spec.lua | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 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',