From 747d4fe80b8dfdc65260868230b8e3fded328228 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 5 Aug 2017 19:51:38 +0100 Subject: [PATCH] Stop writing a test file in real world usage in some cases --- autoload/ale/fix.vim | 1 - test/test_ale_fix.vader | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 45855a5..12cbea4 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -43,7 +43,6 @@ function! ale#fix#ApplyQueuedFixes() abort if empty(&buftype) noautocmd :w! else - call writefile(l:data.output, 'fix_test_file') set nomodified endif endif diff --git a/test/test_ale_fix.vader b/test/test_ale_fix.vader index bafeee2..b5c1672 100644 --- a/test/test_ale_fix.vader +++ b/test/test_ale_fix.vader @@ -82,6 +82,8 @@ After: call ale#fix#registry#ResetToDefaults() call ale#linter#Reset() + setlocal buftype=nofile + if filereadable('fix_test_file') call delete('fix_test_file') endif @@ -245,6 +247,9 @@ Execute(ALEFix should save files on the save event): let g:ale_fixers.testft = ['AddDollars'] + " We have to set the buftype to empty so the file will be written. + setlocal buftype= + call SetUpLinters() call ale#events#SaveEvent(bufnr(''))