Patch 9.0.0611
Problem:    Tests delete files with a separate delete() call.
Solution:   Use deferred delete.
Files:      src/testdir/test_file_perm.vim, src/testdir/test_filechanged.vim,
            src/testdir/test_fileformat.vim, src/testdir/test_filetype.vim,
            src/testdir/test_find_complete.vim, src/testdir/test_findfile.vim,
            src/testdir/test_fold.vim, src/testdir/test_function_lists.vim,
            src/testdir/test_functions.vim


*** ../vim-9.0.0610/src/testdir/test_file_perm.vim      2022-09-02 
21:55:45.499049444 +0100
--- src/testdir/test_file_perm.vim      2022-09-27 19:28:16.347865540 +0100
***************
*** 1,26 ****
  " Test getting and setting file permissions.
  
  func Test_file_perm()
!   call assert_equal('', getfperm('Xtest'))
!   call assert_equal(0, 'Xtest'->setfperm('r--------'))
  
!   call writefile(['one'], 'Xtest')
!   call assert_true(len('Xtest'->getfperm()) == 9)
  
!   call assert_equal(1, setfperm('Xtest', 'rwx------'))
    if has('win32')
!     call assert_equal('rw-rw-rw-', getfperm('Xtest'))
    else
!     call assert_equal('rwx------', getfperm('Xtest'))
    endif
  
!   call assert_equal(1, setfperm('Xtest', 'r--r--r--'))
!   call assert_equal('r--r--r--', getfperm('Xtest'))
  
!   call assert_fails("setfperm('Xtest', '---')")
  
!   call assert_equal(1, setfperm('Xtest', 'rwx------'))
!   call delete('Xtest')
  
    call assert_fails("call setfperm(['Xpermfile'], 'rw-rw-rw-')", 'E730:')
    call assert_fails("call setfperm('Xpermfile', [])", 'E730:')
--- 1,25 ----
  " Test getting and setting file permissions.
  
  func Test_file_perm()
!   call assert_equal('', getfperm('XtestPerm'))
!   call assert_equal(0, 'XtestPerm'->setfperm('r--------'))
  
!   call writefile(['one'], 'XtestPerm', 'D')
!   call assert_true(len('XtestPerm'->getfperm()) == 9)
  
!   call assert_equal(1, setfperm('XtestPerm', 'rwx------'))
    if has('win32')
!     call assert_equal('rw-rw-rw-', getfperm('XtestPerm'))
    else
!     call assert_equal('rwx------', getfperm('XtestPerm'))
    endif
  
!   call assert_equal(1, setfperm('XtestPerm', 'r--r--r--'))
!   call assert_equal('r--r--r--', getfperm('XtestPerm'))
  
!   call assert_fails("setfperm('XtestPerm', '---')")
  
!   call assert_equal(1, setfperm('XtestPerm', 'rwx------'))
  
    call assert_fails("call setfperm(['Xpermfile'], 'rw-rw-rw-')", 'E730:')
    call assert_fails("call setfperm('Xpermfile', [])", 'E730:')
*** ../vim-9.0.0610/src/testdir/test_filechanged.vim    2022-09-02 
21:55:45.503049444 +0100
--- src/testdir/test_filechanged.vim    2022-09-27 18:33:36.062225299 +0100
***************
*** 105,111 ****
      au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let 
v:fcs_choice = 'reload'
    augroup END
    call assert_equal(&fileformat, 'unix')
!   call writefile(["line1\r", "line2\r"], 'Xchanged_r')
    let g:reason = ''
    checktime
    call assert_equal('changed', g:reason)
--- 105,111 ----
      au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let 
v:fcs_choice = 'reload'
    augroup END
    call assert_equal(&fileformat, 'unix')
!   call writefile(["line1\r", "line2\r"], 'Xchanged_r', 'D')
    let g:reason = ''
    checktime
    call assert_equal('changed', g:reason)
***************
*** 134,140 ****
    au! testreload
    bwipe!
    call delete(undofile('Xchanged_r'))
-   call delete('Xchanged_r')
  endfunc
  
  func Test_FileChangedShell_edit_dialog()
--- 134,139 ----
***************
*** 152,158 ****
      au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let 
v:fcs_choice = 'ask'
    augroup END
    call assert_equal(&fileformat, 'unix')
!   call writefile(["line1\r", "line2\r"], 'Xchanged_r')
    let g:reason = ''
    call feedkeys('L', 'L') " load file content only
    checktime
--- 151,157 ----
      au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let 
v:fcs_choice = 'ask'
    augroup END
    call assert_equal(&fileformat, 'unix')
!   call writefile(["line1\r", "line2\r"], 'Xchanged_r', 'D')
    let g:reason = ''
    call feedkeys('L', 'L') " load file content only
    checktime
***************
*** 183,189 ****
    au! testreload
    bwipe!
    call delete(undofile('Xchanged_r'))
-   call delete('Xchanged_r')
  endfunc
  
  func Test_file_changed_dialog()
--- 182,187 ----
***************
*** 241,267 ****
    " File created after starting to edit it
    call delete('Xchanged_d')
    new Xchanged_d
!   call writefile(['one'], 'Xchanged_d')
    call feedkeys('L', 'L')
    checktime Xchanged_d
    call assert_equal(['one'], getline(1, '$'))
    close!
  
    bwipe!
-   call delete('Xchanged_d')
  endfunc
  
  " Test for editing a new buffer from a FileChangedShell autocmd
  func Test_FileChangedShell_newbuf()
!   call writefile(['one', 'two'], 'Xchfile')
    new Xchfile
    augroup testnewbuf
      autocmd FileChangedShell * enew
    augroup END
    call writefile(['red'], 'Xchfile')
    call assert_fails('checktime', 'E811:')
    au! testnewbuf
-   call delete('Xchfile')
  endfunc
  
  " vim: shiftwidth=2 sts=2 expandtab
--- 239,264 ----
    " File created after starting to edit it
    call delete('Xchanged_d')
    new Xchanged_d
!   call writefile(['one'], 'Xchanged_d', 'D')
    call feedkeys('L', 'L')
    checktime Xchanged_d
    call assert_equal(['one'], getline(1, '$'))
    close!
  
    bwipe!
  endfunc
  
  " Test for editing a new buffer from a FileChangedShell autocmd
  func Test_FileChangedShell_newbuf()
!   call writefile(['one', 'two'], 'Xchfile', 'D')
    new Xchfile
    augroup testnewbuf
      autocmd FileChangedShell * enew
    augroup END
    call writefile(['red'], 'Xchfile')
    call assert_fails('checktime', 'E811:')
+ 
    au! testnewbuf
  endfunc
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.0610/src/testdir/test_fileformat.vim     2022-09-02 
21:55:45.503049444 +0100
--- src/testdir/test_fileformat.vim     2022-09-27 19:29:35.712550845 +0100
***************
*** 22,35 ****
  func Test_fileformat_autocommand()
    let filecnt = ["", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", 
"drei", "vier", "fünf", ""]
    let ffs = &ffs
!   call writefile(filecnt, 'Xffafile', 'b')
    au BufReadPre Xffafile set ffs=dos ff=dos
    new Xffafile
    call assert_equal('dos', &l:ff)
    call assert_equal('dos', &ffs)
  
    " cleanup
-   call delete('Xffafile')
    let &ffs = ffs
    au! BufReadPre Xffafile
    bw!
--- 22,34 ----
  func Test_fileformat_autocommand()
    let filecnt = ["", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", 
"drei", "vier", "fünf", ""]
    let ffs = &ffs
!   call writefile(filecnt, 'Xffafile', 'bD')
    au BufReadPre Xffafile set ffs=dos ff=dos
    new Xffafile
    call assert_equal('dos', &l:ff)
    call assert_equal('dos', &ffs)
  
    " cleanup
    let &ffs = ffs
    au! BufReadPre Xffafile
    bw!
***************
*** 65,75 ****
  " Test for a lot of variations of the 'fileformats' option
  func Test_fileformats()
    " create three test files, one in each format
!   call writefile(['unix', 'unix'], 'XXUnix')
!   call writefile(["dos\r", "dos\r"], 'XXDos')
!   call writefile(["mac\rmac\r"], 'XXMac', 'b')
    " create a file with no End Of Line
!   call writefile(["noeol"], 'XXEol', 'b')
    " create mixed format files
    call s:concat_files('XXUnix', 'XXDos', 'XXUxDs')
    call s:concat_files('XXUnix', 'XXMac', 'XXUxMac')
--- 64,74 ----
  " Test for a lot of variations of the 'fileformats' option
  func Test_fileformats()
    " create three test files, one in each format
!   call writefile(['unix', 'unix'], 'XXUnix', 'D')
!   call writefile(["dos\r", "dos\r"], 'XXDos', 'D')
!   call writefile(["mac\rmac\r"], 'XXMac', 'bD')
    " create a file with no End Of Line
!   call writefile(["noeol"], 'XXEol', 'bD')
    " create mixed format files
    call s:concat_files('XXUnix', 'XXDos', 'XXUxDs')
    call s:concat_files('XXUnix', 'XXMac', 'XXUxMac')
***************
*** 277,286 ****
    " cleanup
    only
    %bwipe!
-   call delete('XXUnix')
-   call delete('XXDos')
-   call delete('XXMac')
-   call delete('XXEol')
    call delete('XXUxDs')
    call delete('XXUxMac')
    call delete('XXDosMac')
--- 276,281 ----
*** ../vim-9.0.0610/src/testdir/test_filetype.vim       2022-09-27 
13:07:01.899285179 +0100
--- src/testdir/test_filetype.vim       2022-09-27 19:09:48.441108327 +0100
***************
*** 14,20 ****
  
  func Test_conf_type()
    filetype on
!   call writefile(['# some comment', 'must be conf'], 'Xconffile')
    augroup filetypedetect
      au BufNewFile,BufRead *   call assert_equal(0, did_filetype())
    augroup END
--- 14,20 ----
  
  func Test_conf_type()
    filetype on
!   call writefile(['# some comment', 'must be conf'], 'Xconffile', 'D')
    augroup filetypedetect
      au BufNewFile,BufRead *   call assert_equal(0, did_filetype())
    augroup END
***************
*** 22,28 ****
    call assert_equal('conf', &filetype)
  
    bwipe!
-   call delete('Xconffile')
    filetype off
  endfunc
  
--- 22,27 ----
***************
*** 33,44 ****
      au BufNewFile,BufRead Xotherfile  setf testfile
      au BufNewFile,BufRead *   call assert_equal(1, did_filetype())
    augroup END
!   call writefile(['# some comment', 'must be conf'], 'Xotherfile')
    split Xotherfile
    call assert_equal('testfile', &filetype)
  
    bwipe!
-   call delete('Xotherfile')
    filetype off
  endfunc
  
--- 32,42 ----
      au BufNewFile,BufRead Xotherfile  setf testfile
      au BufNewFile,BufRead *   call assert_equal(1, did_filetype())
    augroup END
!   call writefile(['# some comment', 'must be conf'], 'Xotherfile', 'D')
    split Xotherfile
    call assert_equal('testfile', &filetype)
  
    bwipe!
    filetype off
  endfunc
  
***************
*** 761,773 ****
    filetype on
    for [ft, files] in items(a:test_dict)
      for file in files
!       call writefile(file, 'Xtest')
        split Xtest
        call assert_equal(ft, &filetype, 'for text: ' . string(file))
        bwipe!
      endfor
    endfor
-   call delete('Xtest')
    filetype off
  endfunc
  
--- 759,770 ----
    filetype on
    for [ft, files] in items(a:test_dict)
      for file in files
!       call writefile(file, 'Xtest', 'D')
        split Xtest
        call assert_equal(ft, &filetype, 'for text: ' . string(file))
        bwipe!
      endfor
    endfor
    filetype off
  endfunc
  
***************
*** 813,819 ****
  func Test_bas_file()
    filetype on
  
!   call writefile(['looks like BASIC'], 'Xfile.bas')
    split Xfile.bas
    call assert_equal('basic', &filetype)
    bwipe!
--- 810,816 ----
  func Test_bas_file()
    filetype on
  
!   call writefile(['looks like BASIC'], 'Xfile.bas', 'D')
    split Xfile.bas
    call assert_equal('basic', &filetype)
    bwipe!
***************
*** 867,873 ****
    call assert_equal('vb', &filetype)
    bwipe!
  
-   call delete('Xfile.bas')
    filetype off
  endfunc
  
--- 864,869 ----
***************
*** 876,882 ****
    filetype on
  
    " *.cfg defaults to cfg
!   call writefile(['looks like cfg'], 'cfgfile.cfg')
    split cfgfile.cfg
    call assert_equal('cfg', &filetype)
  
--- 872,878 ----
    filetype on
  
    " *.cfg defaults to cfg
!   call writefile(['looks like cfg'], 'cfgfile.cfg', 'D')
    split cfgfile.cfg
    call assert_equal('cfg', &filetype)
  
***************
*** 905,911 ****
  func Test_d_file()
    filetype on
  
!   call writefile(['looks like D'], 'Xfile.d')
    split Xfile.d
    call assert_equal('d', &filetype)
    bwipe!
--- 901,907 ----
  func Test_d_file()
    filetype on
  
!   call writefile(['looks like D'], 'Xfile.d', 'D')
    split Xfile.d
    call assert_equal('d', &filetype)
    bwipe!
***************
*** 937,943 ****
  
    " clean up
    filetype off
-   call delete('Xfile.d')
  endfunc
  
  func Test_dat_file()
--- 933,938 ----
***************
*** 978,984 ****
  func Test_dep3patch_file()
    filetype on
  
!   call assert_true(mkdir('debian/patches', 'p'))
  
    " series files are not patches
    call writefile(['Description: some awesome patch'], 'debian/patches/series')
--- 973,979 ----
  func Test_dep3patch_file()
    filetype on
  
!   call assert_true(mkdir('debian/patches', 'pR'))
  
    " series files are not patches
    call writefile(['Description: some awesome patch'], 'debian/patches/series')
***************
*** 1011,1024 ****
    split debian/patches/baz
    call assert_notequal('dep3patch', &filetype)
    bwipe!
- 
-   call delete('debian', 'rf')
  endfunc
  
  func Test_dsl_file()
    filetype on
  
!   call writefile(['  <!doctype dsssl-spec ['], 'dslfile.dsl')
    split dslfile.dsl
    call assert_equal('dsl', &filetype)
    bwipe!
--- 1006,1017 ----
    split debian/patches/baz
    call assert_notequal('dep3patch', &filetype)
    bwipe!
  endfunc
  
  func Test_dsl_file()
    filetype on
  
!   call writefile(['  <!doctype dsssl-spec ['], 'dslfile.dsl', 'D')
    split dslfile.dsl
    call assert_equal('dsl', &filetype)
    bwipe!
***************
*** 1028,1041 ****
    call assert_equal('structurizr', &filetype)
    bwipe!
  
-   call delete('dslfile.dsl')
    filetype off
  endfunc
  
  func Test_ex_file()
    filetype on
  
!   call writefile(['arbitrary content'], 'Xfile.ex')
    split Xfile.ex
    call assert_equal('elixir', &filetype)
    bwipe!
--- 1021,1033 ----
    call assert_equal('structurizr', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_ex_file()
    filetype on
  
!   call writefile(['arbitrary content'], 'Xfile.ex', 'D')
    split Xfile.ex
    call assert_equal('elixir', &filetype)
    bwipe!
***************
*** 1065,1095 ****
    call assert_equal('euphoria3', &filetype)
    bwipe!
  
-   call delete('Xfile.ex')
    filetype off
  endfunc
  
  func Test_foam_file()
    filetype on
!   call assert_true(mkdir('0', 'p'))
!   call assert_true(mkdir('0.orig', 'p'))
  
!   call writefile(['FoamFile {', '    object something;'], 'Xfile1Dict')
    split Xfile1Dict
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 
'Xfile1Dict.something')
    split Xfile1Dict.something
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 'XfileProperties')
    split XfileProperties
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 
'XfileProperties.something')
    split XfileProperties.something
    call assert_equal('foam', &filetype)
    bwipe!
--- 1057,1086 ----
    call assert_equal('euphoria3', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_foam_file()
    filetype on
!   call assert_true(mkdir('0', 'pR'))
!   call assert_true(mkdir('0.orig', 'pR'))
  
!   call writefile(['FoamFile {', '    object something;'], 'Xfile1Dict', 'D')
    split Xfile1Dict
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 
'Xfile1Dict.something', 'D')
    split Xfile1Dict.something
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 'XfileProperties', 
'D')
    split XfileProperties
    call assert_equal('foam', &filetype)
    bwipe!
  
!   call writefile(['FoamFile {', '    object something;'], 
'XfileProperties.something', 'D')
    split XfileProperties.something
    call assert_equal('foam', &filetype)
    bwipe!
***************
*** 1114,1132 ****
    call assert_equal('foam', &filetype)
    bwipe!
  
-   call delete('0', 'rf')
-   call delete('0.orig', 'rf')
-   call delete('Xfile1Dict')
-   call delete('Xfile1Dict.something')
-   call delete('XfileProperties')
-   call delete('XfileProperties.something')
    filetype off
  endfunc
  
  func Test_frm_file()
    filetype on
  
!   call writefile(['looks like FORM'], 'Xfile.frm')
    split Xfile.frm
    call assert_equal('form', &filetype)
    bwipe!
--- 1105,1117 ----
    call assert_equal('foam', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_frm_file()
    filetype on
  
!   call writefile(['looks like FORM'], 'Xfile.frm', 'D')
    split Xfile.frm
    call assert_equal('form', &filetype)
    bwipe!
***************
*** 1146,1159 ****
    call assert_equal('vb', &filetype)
    bwipe!
  
-   call delete('Xfile.frm')
    filetype off
  endfunc
  
  func Test_fs_file()
    filetype on
  
!   call writefile(['looks like F#'], 'Xfile.fs')
    split Xfile.fs
    call assert_equal('fsharp', &filetype)
    bwipe!
--- 1131,1143 ----
    call assert_equal('vb', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_fs_file()
    filetype on
  
!   call writefile(['looks like F#'], 'Xfile.fs', 'D')
    split Xfile.fs
    call assert_equal('fsharp', &filetype)
    bwipe!
***************
*** 1199,1212 ****
    call assert_equal('forth', &filetype)
    bwipe!
  
-   call delete('Xfile.fs')
    filetype off
  endfunc
  
  func Test_git_file()
    filetype on
  
!   call assert_true(mkdir('Xrepo.git', 'p'))
  
    call writefile([], 'Xrepo.git/HEAD')
    split Xrepo.git/HEAD
--- 1183,1195 ----
    call assert_equal('forth', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_git_file()
    filetype on
  
!   call assert_true(mkdir('Xrepo.git', 'pR'))
  
    call writefile([], 'Xrepo.git/HEAD')
    split Xrepo.git/HEAD
***************
*** 1228,1241 ****
    call assert_equal('git', &filetype)
    bwipe!
  
-   call delete('Xrepo.git', 'rf')
    filetype off
  endfunc
  
  func Test_hook_file()
    filetype on
  
!   call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook')
    split Xfile.hook
    call assert_equal('conf', &filetype)
    bwipe!
--- 1211,1223 ----
    call assert_equal('git', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_hook_file()
    filetype on
  
!   call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
    split Xfile.hook
    call assert_equal('conf', &filetype)
    bwipe!
***************
*** 1245,1251 ****
    call assert_notequal('conf', &filetype)
    bwipe!
  
-   call delete('Xfile.hook')
    filetype off
  endfunc
  
--- 1227,1232 ----
***************
*** 1345,1351 ****
    call assert_equal('murphi', &filetype)
    bwipe!
  
-   call delete('Xfile.m')
    filetype off
  endfunc
  
--- 1326,1331 ----
***************
*** 1427,1433 ****
  func Test_patch_file()
    filetype on
  
!   call writefile([], 'Xfile.patch')
    split Xfile.patch
    call assert_equal('diff', &filetype)
    bwipe!
--- 1407,1413 ----
  func Test_patch_file()
    filetype on
  
!   call writefile([], 'Xfile.patch', 'D')
    split Xfile.patch
    call assert_equal('diff', &filetype)
    bwipe!
***************
*** 1442,1448 ****
    call assert_equal('gitsendemail', &filetype)
    bwipe!
  
-   call delete('Xfile.patch')
    filetype off
  endfunc
  
--- 1422,1427 ----
***************
*** 1454,1472 ****
  
      use a
    END
!   call writefile(lines, "Xfile.t")
    split Xfile.t
    call assert_equal('perl', &filetype)
    bwipe
  
-   call delete('Xfile.t')
    filetype off
  endfunc
  
  func Test_pp_file()
    filetype on
  
!   call writefile(['looks like puppet'], 'Xfile.pp')
    split Xfile.pp
    call assert_equal('puppet', &filetype)
    bwipe!
--- 1433,1450 ----
  
      use a
    END
!   call writefile(lines, "Xfile.t", 'D')
    split Xfile.t
    call assert_equal('perl', &filetype)
    bwipe
  
    filetype off
  endfunc
  
  func Test_pp_file()
    filetype on
  
!   call writefile(['looks like puppet'], 'Xfile.pp', 'D')
    split Xfile.pp
    call assert_equal('puppet', &filetype)
    bwipe!
***************
*** 1488,1494 ****
    call assert_equal('pascal', &filetype)
    bwipe!
  
-   call delete('Xfile.pp')
    filetype off
  endfunc
  
--- 1466,1471 ----
***************
*** 1575,1586 ****
  func Test_scd_file()
    filetype on
  
!   call writefile(['ijq(1)'], 'srcfile.scd')
    split srcfile.scd
    call assert_equal('scdoc', &filetype)
-   bwipe!
-   call delete('srcfile.scd')
  
    filetype off
  endfunc
  
--- 1552,1562 ----
  func Test_scd_file()
    filetype on
  
!   call writefile(['ijq(1)'], 'srcfile.scd', 'D')
    split srcfile.scd
    call assert_equal('scdoc', &filetype)
  
+   bwipe!
    filetype off
  endfunc
  
***************
*** 1684,1690 ****
  func Test_tf_file()
    filetype on
  
!   call writefile([';;; TF MUD client is super duper cool'], 'Xfile.tf')
    split Xfile.tf
    call assert_equal('tf', &filetype)
    bwipe!
--- 1660,1666 ----
  func Test_tf_file()
    filetype on
  
!   call writefile([';;; TF MUD client is super duper cool'], 'Xfile.tf', 'D')
    split Xfile.tf
    call assert_equal('tf', &filetype)
    bwipe!
***************
*** 1694,1707 ****
    call assert_equal('terraform', &filetype)
    bwipe!
  
-   call delete('Xfile.tf')
    filetype off
  endfunc
  
  func Test_ts_file()
    filetype on
  
!   call writefile(['<?xml version="1.0" encoding="utf-8"?>'], 'Xfile.ts')
    split Xfile.ts
    call assert_equal('xml', &filetype)
    bwipe!
--- 1670,1682 ----
    call assert_equal('terraform', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_ts_file()
    filetype on
  
!   call writefile(['<?xml version="1.0" encoding="utf-8"?>'], 'Xfile.ts', 'D')
    split Xfile.ts
    call assert_equal('xml', &filetype)
    bwipe!
***************
*** 1711,1724 ****
    call assert_equal('typescript', &filetype)
    bwipe!
  
-   call delete('Xfile.ts')
    filetype off
  endfunc
  
  func Test_ttl_file()
    filetype on
  
!   call writefile(['@base <http://example.org/> .'], 'Xfile.ttl')
    split Xfile.ttl
    call assert_equal('turtle', &filetype)
    bwipe!
--- 1686,1698 ----
    call assert_equal('typescript', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_ttl_file()
    filetype on
  
!   call writefile(['@base <http://example.org/> .'], 'Xfile.ttl', 'D')
    split Xfile.ttl
    call assert_equal('turtle', &filetype)
    bwipe!
***************
*** 1728,1753 ****
    call assert_equal('teraterm', &filetype)
    bwipe!
  
-   call delete('Xfile.ttl')
    filetype off
  endfunc
  
  func Test_xpm_file()
    filetype on
  
!   call writefile(['this is XPM2'], 'file.xpm')
    split file.xpm
    call assert_equal('xpm2', &filetype)
    bwipe!
  
-   call delete('file.xpm')
    filetype off
  endfunc
  
  func Test_cls_file()
    filetype on
  
!   call writefile(['looks like Smalltalk'], 'Xfile.cls')
    split Xfile.cls
    call assert_equal('st', &filetype)
    bwipe!
--- 1702,1725 ----
    call assert_equal('teraterm', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_xpm_file()
    filetype on
  
!   call writefile(['this is XPM2'], 'file.xpm', 'D')
    split file.xpm
    call assert_equal('xpm2', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_cls_file()
    filetype on
  
!   call writefile(['looks like Smalltalk'], 'Xfile.cls', 'D')
    split Xfile.cls
    call assert_equal('st', &filetype)
    bwipe!
***************
*** 1781,1794 ****
    call assert_equal('vb', &filetype)
    bwipe!
  
-   call delete('Xfile.cls')
    filetype off
  endfunc
  
  func Test_sig_file()
    filetype on
  
!   call writefile(['this is neither Lambda Prolog nor SML'], 'Xfile.sig')
    split Xfile.sig
    call assert_equal('', &filetype)
    bwipe!
--- 1753,1765 ----
    call assert_equal('vb', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_sig_file()
    filetype on
  
!   call writefile(['this is neither Lambda Prolog nor SML'], 'Xfile.sig', 'D')
    split Xfile.sig
    call assert_equal('', &filetype)
    bwipe!
***************
*** 1835,1841 ****
    call assert_equal('sml', &filetype)
    bwipe!
  
-   call delete('Xfile.sig')
    filetype off
  endfunc
  
--- 1806,1811 ----
***************
*** 1855,1861 ****
    let protoErasedPathA =
            \ABCProtocol.a
    END
!   call writefile(lines, 'Xfile.sil')
  
    split Xfile.sil
    call assert_equal('sil', &filetype)
--- 1825,1831 ----
    let protoErasedPathA =
            \ABCProtocol.a
    END
!   call writefile(lines, 'Xfile.sil', 'D')
  
    split Xfile.sil
    call assert_equal('sil', &filetype)
***************
*** 1873,1886 ****
    call assert_equal('sile', &filetype)
    bwipe!
  
-   call delete('Xfile.sil')
    filetype off
  endfunc
  
  func Test_inc_file()
    filetype on
  
!   call writefile(['this is the fallback'], 'Xfile.inc')
    split Xfile.inc
    call assert_equal('pov', &filetype)
    bwipe!
--- 1843,1855 ----
    call assert_equal('sile', &filetype)
    bwipe!
  
    filetype off
  endfunc
  
  func Test_inc_file()
    filetype on
  
!   call writefile(['this is the fallback'], 'Xfile.inc', 'D')
    split Xfile.inc
    call assert_equal('pov', &filetype)
    bwipe!
***************
*** 1952,1958 ****
    call assert_equal('foo', &filetype)
    bwipe!
  
-   call delete('Xfile.inc')
    filetype off
  endfunc
  
--- 1921,1926 ----
*** ../vim-9.0.0610/src/testdir/test_find_complete.vim  2020-08-12 
17:43:41.000000000 +0100
--- src/testdir/test_find_complete.vim  2022-09-27 19:10:26.120958368 +0100
***************
*** 10,16 ****
    call delete("Xfind", "rf")
    let cwd = getcwd()
    let test_out = cwd . '/test.out'
!   call mkdir('Xfind')
    cd Xfind
  
    new
--- 10,16 ----
    call delete("Xfind", "rf")
    let cwd = getcwd()
    let test_out = cwd . '/test.out'
!   call mkdir('Xfind', 'R')
    cd Xfind
  
    new
***************
*** 158,164 ****
  
    enew | only
    call chdir(cwd)
-   call delete('Xfind', 'rf')
    set path&
  endfunc
  
--- 158,163 ----
*** ../vim-9.0.0610/src/testdir/test_findfile.vim       2022-08-29 
22:31:15.919685279 +0100
--- src/testdir/test_findfile.vim       2022-09-27 19:16:12.099582877 +0100
***************
*** 232,238 ****
    new
    let save_path = &path
    let save_dir = getcwd()
!   call mkdir('dir1/dir2', 'p')
    call writefile([], 'dir1/file.txt')
    call writefile([], 'dir1/dir2/base.txt')
    call chdir('dir1/dir2')
--- 232,238 ----
    new
    let save_path = &path
    let save_dir = getcwd()
!   call mkdir('dir1/dir2', 'pR')
    call writefile([], 'dir1/file.txt')
    call writefile([], 'dir1/dir2/base.txt')
    call chdir('dir1/dir2')
***************
*** 243,252 ****
  
    call chdir(save_dir)
    bw!
-   call delete('dir1/dir2/base.txt', 'rf')
-   call delete('dir1/dir2', 'rf')
-   call delete('dir1/file.txt', 'rf')
-   call delete('dir1', 'rf')
    let &path = save_path
  endfunc
  
--- 243,248 ----
*** ../vim-9.0.0610/src/testdir/test_fold.vim   2022-09-02 21:55:45.503049444 
+0100
--- src/testdir/test_fold.vim   2022-09-27 19:17:25.935289585 +0100
***************
*** 137,143 ****
      call assert_equal(1, foldlevel(n))
    endfor
  
!   call writefile(["a", "", "\<Tab>a"], 'Xinfofile')
    foldopen
    2read Xinfofile
    %foldclose
--- 137,143 ----
      call assert_equal(1, foldlevel(n))
    endfor
  
!   call writefile(["a", "", "\<Tab>a"], 'Xinfofile', 'D')
    foldopen
    2read Xinfofile
    %foldclose
***************
*** 150,156 ****
  
    bwipe!
    set foldmethod&
-   call delete('Xinfofile')
  endfunc
  
  func Test_combining_folds_indent()
--- 150,155 ----
***************
*** 216,222 ****
    set foldexpr=s:TestFoldExpr(v:lnum)
    2
    foldopen
!   call writefile(['b', 'b', 'a', 'a', 'd', 'a', 'a', 'c'], 'Xupfofile')
    read Xupfofile
    %foldclose
    call assert_equal(2, foldclosedend(1))
--- 215,221 ----
    set foldexpr=s:TestFoldExpr(v:lnum)
    2
    foldopen
!   call writefile(['b', 'b', 'a', 'a', 'd', 'a', 'a', 'c'], 'Xupfofile', 'D')
    read Xupfofile
    %foldclose
    call assert_equal(2, foldclosedend(1))
***************
*** 226,232 ****
    call assert_equal(10, foldclosedend(7))
    call assert_equal(14, foldclosedend(11))
  
-   call delete('Xupfofile')
    bwipe!
    set foldmethod& foldexpr&
  endfunc
--- 225,230 ----
***************
*** 808,814 ****
    call writefile([
        \ 'set fdm=marker rnu foldcolumn=2',
        \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])',
!       \ ], 'Xtest_folds_with_rnu')
    let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {})
  
    call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {})
--- 806,812 ----
    call writefile([
        \ 'set fdm=marker rnu foldcolumn=2',
        \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])',
!       \ ], 'Xtest_folds_with_rnu', 'D')
    let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {})
  
    call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {})
***************
*** 817,823 ****
  
    " clean up
    call StopVimInTerminal(buf)
-   call delete('Xtest_folds_with_rnu')
  endfunc
  
  func Test_folds_marker_in_comment2()
--- 815,820 ----
***************
*** 1263,1269 ****
          \ foldclosed(4)])], 'Xoutput', 'a')
      endfunc
    END
!   call writefile(lines, 'Xscript')
    let rows = 10
    let buf = RunVimInTerminal('-S Xscript', {'rows': rows})
    call term_wait(buf)
--- 1260,1266 ----
          \ foldclosed(4)])], 'Xoutput', 'a')
      endfunc
    END
!   call writefile(lines, 'Xscript', 'D')
    let rows = 10
    let buf = RunVimInTerminal('-S Xscript', {'rows': rows})
    call term_wait(buf)
***************
*** 1292,1298 ****
  
    call assert_equal(['[-1,2,2,-1]', '[-1,-1,-1,-1]', '[-1,2,2,-1]',
          \ '[-1,-1,-1,-1]', '[-1,2,2,-1]'], readfile('Xoutput'))
-   call delete('Xscript')
    call delete('Xoutput')
  endfunc
  
--- 1289,1294 ----
*** ../vim-9.0.0610/src/testdir/test_function_lists.vim 2021-12-27 
21:40:18.000000000 +0000
--- src/testdir/test_function_lists.vim 2022-09-27 19:23:26.889856596 +0100
***************
*** 10,22 ****
  func Test_function_lists()
  
    " Delete any files left over from an earlier run of this test.
- 
    call delete("Xglobal_functions.diff")
    call delete("Xfunctions.diff")
    call delete("Xfunction-list.diff")
  
    " Create a file of the functions in evalfunc.c:global_functions[].
- 
    enew!
    read ../evalfunc.c
    1,/^static funcentry_T global_functions\[\] =$/d
--- 10,20 ----
***************
*** 28,34 ****
    w! Xglobal_functions
  
    " Verify that those functions are in ASCII order.
- 
    sort u
    w! Xsorted_global_functions
    let l:unequal = assert_equalfile("Xsorted_global_functions", 
"Xglobal_functions",
--- 26,31 ----
***************
*** 39,45 ****
  
    " Create a file of the functions in evalfunc.c:global_functions[] that are
    " not obsolete, sorted in ASCII order.
- 
    enew!
    read ../evalfunc.c
    1,/^static funcentry_T global_functions\[\] =$/d
--- 36,41 ----
***************
*** 53,59 ****
    w! ++ff=unix Xsorted_current_global_functions
  
    " Verify that the ":help functions" list is complete and in ASCII order.
- 
    enew!
    if filereadable('../../doc/builtin.txt')
      " unpacked MS-Windows zip archive
--- 49,54 ----
***************
*** 77,83 ****
    endif
  
    " Verify that the ":help function-list" list is complete.
- 
    enew!
    if filereadable('../../doc/usr_41.txt')
      " unpacked MS-Windows zip archive
--- 72,77 ----
*** ../vim-9.0.0610/src/testdir/test_functions.vim      2022-09-17 
21:07:52.107993141 +0100
--- src/testdir/test_functions.vim      2022-09-27 19:27:13.051223676 +0100
***************
*** 1326,1334 ****
  
    call assert_equal(0, filewritable('doesnotexist'))
  
!   call mkdir('Xwritedir')
    call assert_equal(2, filewritable('Xwritedir'))
-   call delete('Xwritedir', 'd')
  
    call delete('Xfilewritable')
    bw!
--- 1326,1333 ----
  
    call assert_equal(0, filewritable('doesnotexist'))
  
!   call mkdir('Xwritedir', 'D')
    call assert_equal(2, filewritable('Xwritedir'))
  
    call delete('Xfilewritable')
    bw!
***************
*** 1661,1667 ****
        let g:buf = bufadd('Xb.txt')
        inoremap <F2> <C-R>=setbufvar(g:buf, '&autoindent', 1) ?? ''<CR>
    END
!   call writefile(lines, 'Xsetbufvar')
    let buf = RunVimInTerminal('-S Xsetbufvar', {})
    call WaitForAssert({-> assert_match('Xa.txt', term_gettitle(buf))}, 1000)
  
--- 1660,1666 ----
        let g:buf = bufadd('Xb.txt')
        inoremap <F2> <C-R>=setbufvar(g:buf, '&autoindent', 1) ?? ''<CR>
    END
!   call writefile(lines, 'Xsetbufvar', 'D')
    let buf = RunVimInTerminal('-S Xsetbufvar', {})
    call WaitForAssert({-> assert_match('Xa.txt', term_gettitle(buf))}, 1000)
  
***************
*** 1672,1678 ****
    call assert_match('Xa.txt', term_gettitle(buf))
  
    call StopVimInTerminal(buf)
-   call delete('Xsetbufvar')
  endfunc
  
  func Test_redo_in_nested_functions()
--- 1671,1676 ----
***************
*** 1938,1956 ****
  func Test_func_range_with_edit()
    " Define a function that edits another buffer, then call it with a range 
that
    " is invalid in that buffer.
!   call writefile(['just one line'], 'Xfuncrange2')
    new
    eval 10->range()->setline(1)
    write Xfuncrange1
    call assert_fails('5,8call EditAnotherFile()', 'E16:')
  
    call delete('Xfuncrange1')
-   call delete('Xfuncrange2')
    bwipe!
  endfunc
  
  func Test_func_exists_on_reload()
!   call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 
'Xfuncexists')
    call assert_equal(0, exists('*ExistingFunction'))
    source Xfuncexists
    call assert_equal(1, '*ExistingFunction'->exists())
--- 1936,1953 ----
  func Test_func_range_with_edit()
    " Define a function that edits another buffer, then call it with a range 
that
    " is invalid in that buffer.
!   call writefile(['just one line'], 'Xfuncrange2', 'D')
    new
    eval 10->range()->setline(1)
    write Xfuncrange1
    call assert_fails('5,8call EditAnotherFile()', 'E16:')
  
    call delete('Xfuncrange1')
    bwipe!
  endfunc
  
  func Test_func_exists_on_reload()
!   call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 
'Xfuncexists', 'D')
    call assert_equal(0, exists('*ExistingFunction'))
    source Xfuncexists
    call assert_equal(1, '*ExistingFunction'->exists())
***************
*** 1959,1965 ****
    call assert_equal(1, exists('*ExistingFunction'))
  
    " But redefining in another script is not OK.
!   call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 
'Xfuncexists2')
    call assert_fails('source Xfuncexists2', 'E122:')
  
    " Defining a new function from the cmdline should fail if the function is
--- 1956,1962 ----
    call assert_equal(1, exists('*ExistingFunction'))
  
    " But redefining in another script is not OK.
!   call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 
'Xfuncexists2', 'D')
    call assert_fails('source Xfuncexists2', 'E122:')
  
    " Defining a new function from the cmdline should fail if the function is
***************
*** 1975,1982 ****
    call assert_fails('source Xfuncexists', 'E122:')
    call assert_equal(1, exists('*ExistingFunction'))
  
-   call delete('Xfuncexists2')
-   call delete('Xfuncexists')
    delfunc ExistingFunction
  endfunc
  
--- 1972,1977 ----
***************
*** 2063,2069 ****
  endfunc
  
  func Test_readdir()
!   call mkdir('Xreaddir')
    call writefile([], 'Xreaddir/foo.txt')
    call writefile([], 'Xreaddir/bar.txt')
    call mkdir('Xreaddir/dir')
--- 2058,2064 ----
  endfunc
  
  func Test_readdir()
!   call mkdir('Xreaddir', 'R')
    call writefile([], 'Xreaddir/foo.txt')
    call writefile([], 'Xreaddir/bar.txt')
    call mkdir('Xreaddir/dir')
***************
*** 2092,2103 ****
    " Nested readdir() must not crash
    let files = readdir('Xreaddir', 'readdir("Xreaddir", "1") != []')
    call sort(files)->assert_equal(['bar.txt', 'dir', 'foo.txt'])
- 
-   eval 'Xreaddir'->delete('rf')
  endfunc
  
  func Test_readdirex()
!   call mkdir('Xexdir')
    call writefile(['foo'], 'Xexdir/foo.txt')
    call writefile(['barbar'], 'Xexdir/bar.txt')
    call mkdir('Xexdir/dir')
--- 2087,2096 ----
    " Nested readdir() must not crash
    let files = readdir('Xreaddir', 'readdir("Xreaddir", "1") != []')
    call sort(files)->assert_equal(['bar.txt', 'dir', 'foo.txt'])
  endfunc
  
  func Test_readdirex()
!   call mkdir('Xexdir', 'R')
    call writefile(['foo'], 'Xexdir/foo.txt')
    call writefile(['barbar'], 'Xexdir/bar.txt')
    call mkdir('Xexdir/dir')
***************
*** 2144,2150 ****
      call sort(files)->assert_equal(
          \ ['bar.txt_file', 'dir_dir', 'foo.txt_file', 'link_link'])
    endif
-   eval 'Xexdir'->delete('rf')
  
    call assert_fails('call readdirex("doesnotexist")', 'E484:')
  endfunc
--- 2137,2142 ----
***************
*** 2156,2162 ****
      throw 'Skipped: Test_readdirex_sort on systems that do not allow this 
using the default filesystem'
    endif
    let _collate = v:collate
!   call mkdir('Xsortdir2')
    call writefile(['1'], 'Xsortdir2/README.txt')
    call writefile(['2'], 'Xsortdir2/Readme.txt')
    call writefile(['3'], 'Xsortdir2/readme.txt')
--- 2148,2154 ----
      throw 'Skipped: Test_readdirex_sort on systems that do not allow this 
using the default filesystem'
    endif
    let _collate = v:collate
!   call mkdir('Xsortdir2', 'R')
    call writefile(['1'], 'Xsortdir2/README.txt')
    call writefile(['2'], 'Xsortdir2/Readme.txt')
    call writefile(['3'], 'Xsortdir2/readme.txt')
***************
*** 2198,2211 ****
  
    finally
      exe 'lang collate' collate
-     eval 'Xsortdir2'->delete('rf')
    endtry
  endfunc
  
  func Test_readdir_sort()
    " some more cases for testing sorting for readdirex
    let dir = 'Xsortdir3'
!   call mkdir(dir)
    call writefile(['1'], dir .. '/README.txt')
    call writefile(['2'], dir .. '/Readm.txt')
    call writefile(['3'], dir .. '/read.txt')
--- 2190,2202 ----
  
    finally
      exe 'lang collate' collate
    endtry
  endfunc
  
  func Test_readdir_sort()
    " some more cases for testing sorting for readdirex
    let dir = 'Xsortdir3'
!   call mkdir(dir, 'R')
    call writefile(['1'], dir .. '/README.txt')
    call writefile(['2'], dir .. '/Readm.txt')
    call writefile(['3'], dir .. '/read.txt')
***************
*** 2247,2254 ****
  
    " Cleanup
    exe "lang collate" collate
- 
-   eval dir->delete('rf')
  endfunc
  
  func Test_delete_rf()
--- 2238,2243 ----
*** ../vim-9.0.0610/src/version.c       2022-09-27 18:05:35.075074027 +0100
--- src/version.c       2022-09-27 19:31:00.565156657 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     611,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
196. Your computer costs more than your car.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220927183513.21BBA1C0413%40moolenaar.net.

Raspunde prin e-mail lui