comparison src/testdir/test_writefile.vim @ 25569:8e9886ce88b3 v8.2.3321

patch 8.2.3321: some code is not tested Commit: https://github.com/vim/vim/commit/bd9e7961256ea6a98bd5a7bfe14e32c4c47186e6 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Mon Aug 9 21:04:44 2021 +0200 patch 8.2.3321: some code is not tested Problem: Some code is not tested. Solution: Add some more tests. (Dominique Pell?, closes https://github.com/vim/vim/issues/8735)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 Aug 2021 21:15:03 +0200
parents 7da496081b91
children b737bfa876c5
comparison
equal deleted inserted replaced
25568:8c26cfe0b103 25569:8e9886ce88b3
228 call setline(1, ['L1']) 228 call setline(1, ['L1'])
229 call assert_fails('saveas Xfile', 'E139:') 229 call assert_fails('saveas Xfile', 'E139:')
230 close! 230 close!
231 enew | only 231 enew | only
232 call delete('Xfile') 232 call delete('Xfile')
233
234 " :saveas should detect and set the file type.
235 syntax on
236 saveas! Xsaveas.pl
237 call assert_equal('perl', &filetype)
238 syntax off
239 %bw!
240 call delete('Xsaveas.pl')
233 endfunc 241 endfunc
234 242
235 func Test_write_errors() 243 func Test_write_errors()
236 " Test for writing partial buffer 244 " Test for writing partial buffer
237 call writefile(['L1', 'L2', 'L3'], 'Xfile') 245 call writefile(['L1', 'L2', 'L3'], 'Xfile')