To: vim_dev@googlegroups.com Subject: Patch 8.1.10 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1080 Problem: When a screendump test fails, moving the file is a hassle. Solution: Instead of appending ".failed" to the file name, keep the same file name but put the screendump in the "failed" directory. Then the file name only needs to be typed once when moving a screendump. Files: src/testdir/screendump.vim *** ../vim-8.1.1079/src/testdir/screendump.vim 2019-02-21 17:05:54.082970901 +0100 --- src/testdir/screendump.vim 2019-03-30 15:50:25.749604609 +0100 *************** *** 103,109 **** " Returns non-zero when verification fails. func VerifyScreenDump(buf, filename, options, ...) let reference = 'dumps/' . a:filename . '.dump' ! let testfile = a:filename . '.dump.failed' let i = 0 while 1 --- 103,115 ---- " Returns non-zero when verification fails. func VerifyScreenDump(buf, filename, options, ...) let reference = 'dumps/' . a:filename . '.dump' ! let testfile = 'failed/' . a:filename . '.dump' ! ! let did_mkdir = 0 ! if !isdirectory('failed') ! let did_mkdir = 1 ! call mkdir('failed') ! endif let i = 0 while 1 *************** *** 115,120 **** --- 121,129 ---- let refdump = readfile(reference) if refdump == testdump call delete(testfile) + if did_mkdir + call delete('failed', 'd') + endif break endif if i == 100 *** ../vim-8.1.1079/src/version.c 2019-03-30 15:44:14.027783548 +0100 --- src/version.c 2019-03-30 15:52:54.016715147 +0100 *************** *** 777,778 **** --- 777,780 ---- { /* Add new patch number below this line */ + /**/ + 1080, /**/ -- hundred-and-one symptoms of being an internet addict: 160. You get in the elevator and double-click the button for the floor you want. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///