Mercurial > vim
diff src/testdir/test_bufline.vim @ 30110:ba5ca7c7d44c v9.0.0391
patch 9.0.0391: using separate delete() call instead of writefile() 'D' flag
Commit: https://github.com/vim/vim/commit/3411265a3698c3d5ef56d9b0c3bb237a9f5fdba1
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 5 21:40:44 2022 +0100
patch 9.0.0391: using separate delete() call instead of writefile() 'D' flag
Problem: Using separate delete() call instead of writefile() 'D' flag.
Solution: Use the writefile 'D' flag.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Sep 2022 22:45:03 +0200 |
parents | cb4d95b545f1 |
children | 008808e60963 |
line wrap: on
line diff
--- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -81,11 +81,10 @@ func Test_setline_startup() if cmd == '' return endif - call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript') + call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D') call system(cmd) call assert_equal(['Hello'], readfile('Xtest')) - call delete('Xscript') call delete('Xtest') endfunc @@ -214,12 +213,11 @@ func Test_appendbufline_redraw() call deletebufline(buf, 1, '$') call appendbufline(buf, '$', 'Hello Vim world...') END - call writefile(lines, 'XscriptMatchCommon') + call writefile(lines, 'XscriptMatchCommon', 'D') let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 10}) call VerifyScreenDump(buf, 'Test_appendbufline_1', {}) call StopVimInTerminal(buf) - call delete('XscriptMatchCommon') endfunc func Test_setbufline_select_mode()