comparison src/testdir/test_tcl.vim @ 31343:97bb0811cfd4 v9.0.1005

patch 9.0.1005: a failed test may leave a swap file behind Commit: https://github.com/vim/vim/commit/d0f8d39d20f8d42f7451f781f7be0bcd20e06741 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 4 23:00:41 2022 +0000 patch 9.0.1005: a failed test may leave a swap file behind Problem: A failed test may leave a swap file behind. Solution: Delete the swap file to avoid another test to fail. Use another file name.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Dec 2022 00:15:06 +0100
parents c8ebe35b2475
children 56a2af8c0980
comparison
equal deleted inserted replaced
31342:60cf6899a082 31343:97bb0811cfd4
636 %bwipe! 636 %bwipe!
637 endfunc 637 endfunc
638 638
639 " Test $buf delcmd {cmd} (command executed when buffer is deleted) 639 " Test $buf delcmd {cmd} (command executed when buffer is deleted)
640 func Test_buffer_delcmd() 640 func Test_buffer_delcmd()
641 " in case a previous failure left a swap file behind
642 call delete('.Xfoo.swp')
643
641 new Xfoo 644 new Xfoo
642 split 645 split
643 tcl $::vim::current(buffer) delcmd [list set msg "buffer deleted"] 646 tcl $::vim::current(buffer) delcmd [list set msg "buffer deleted"]
644 q 647 q
645 call assert_fails('tcl set msg', "can't read \"msg\": no such variable") 648 call assert_fails('tcl set msg', "can't read \"msg\": no such variable")