diff --git a/test/old/testdir/test_excmd.vim b/test/old/testdir/test_excmd.vim index 9cfc08cb1a..e874876767 100644 --- a/test/old/testdir/test_excmd.vim +++ b/test/old/testdir/test_excmd.vim @@ -71,7 +71,7 @@ func Test_copy() exe "normal! gg4:yank\" call assert_equal("L1\nL2\nL1\nL2\n", @") - close! + bw! endfunc " Test for the :file command @@ -115,7 +115,7 @@ func Test_drop_cmd() call assert_equal(1, winnr('$')) " Check for setting the argument list call assert_equal(['Xdropfile'], argv()) - enew | only! + enew | only! | bw! Xdropfile endfunc " Test for the :append command @@ -143,7 +143,7 @@ func Test_append_cmd() call assert_equal([' L1', ' L2', ' L3'], getline(1, '$')) call assert_true(&autoindent) set autoindent& - close! + bw! endfunc func Test_append_cmd_empty_buf() @@ -192,7 +192,7 @@ func Test_insert_cmd() call assert_equal([' L2', ' L3', ' L1'], getline(1, '$')) call assert_true(&autoindent) set autoindent& - close! + bw! endfunc func Test_insert_cmd_empty_buf() @@ -241,7 +241,7 @@ func Test_change_cmd() call assert_equal([' L4', ' L5', 'L2', 'L3'], getline(1, '$')) call assert_true(&autoindent) set autoindent& - close! + bw! endfunc " Test for the :language command @@ -555,21 +555,20 @@ endfunc " Test for the :read command func Test_read_cmd() - call writefile(['one'], 'Xfile') + call writefile(['one'], 'Xcmdfile', 'D') new call assert_fails('read', 'E32:') - edit Xfile + edit Xcmdfile read call assert_equal(['one', 'one'], getline(1, '$')) - close! + bw! new - read Xfile + read Xcmdfile call assert_equal(['', 'one'], getline(1, '$')) call deletebufline('', 1, '$') - call feedkeys("Qr Xfile\visual\", 'xt') + call feedkeys("Qr Xcmdfile\visual\", 'xt') call assert_equal(['one'], getline(1, '$')) - close! - call delete('Xfile') + bw! endfunc " Test for running Ex commands when text is locked. @@ -636,7 +635,7 @@ func Test_excmd_delete() call assert_equal([' bar'], split(execute('deletp'), "\n")) call setline(1, ['foo', "\tbar"]) call assert_equal([' bar'], split(execute('deletep'), "\n")) - close! + bw! endfunc " Test for commands that are blocked in a sandbox