comparison src/testdir/test_preview.vim @ 30592:457ea0570b6f v9.0.0631

patch 9.0.0631: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/145d1fd91041bd2a22a11eef0357702e420796e2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 30 21:57:11 2022 +0100 patch 9.0.0631: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Sep 2022 23:00:10 +0200
parents 08940efa6b4e
children
comparison
equal deleted inserted replaced
30591:38ef10db4a4e 30592:457ea0570b6f
38 38
39 func Test_window_preview_from_help() 39 func Test_window_preview_from_help()
40 CheckFeature quickfix 40 CheckFeature quickfix
41 41
42 filetype on 42 filetype on
43 call writefile(['/* some C code */'], 'Xpreview.c') 43 call writefile(['/* some C code */'], 'Xpreview.c', 'D')
44 help 44 help
45 pedit Xpreview.c 45 pedit Xpreview.c
46 wincmd P 46 wincmd P
47 call assert_equal(1, &previewwindow) 47 call assert_equal(1, &previewwindow)
48 call assert_equal('c', &filetype) 48 call assert_equal('c', &filetype)
49 wincmd z 49 wincmd z
50 50
51 filetype off 51 filetype off
52 close 52 close
53 call delete('Xpreview.c')
54 endfunc 53 endfunc
55 54
56 func Test_multiple_preview_windows() 55 func Test_multiple_preview_windows()
57 new 56 new
58 set previewwindow 57 set previewwindow