# HG changeset patch # User Bram Moolenaar # Date 1554577205 -7200 # Node ID 67e43b01497f1780bac0c7d3ca2b9bf394d6bed6 # Parent 498933e34fec84e1751e1828f74534c32c45a299 patch 8.1.1129: when making a new screendump test have to create the file commit https://github.com/vim/vim/commit/2d7260d66575052124b76c8b97b957319111bfef Author: Bram Moolenaar Date: Sat Apr 6 20:51:52 2019 +0200 patch 8.1.1129: when making a new screendump test have to create the file Problem: When making a new screendump test have to create the file. Solution: Continue creating the failed screendump, so it can be moved once it is correct. diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim --- a/src/testdir/screendump.vim +++ b/src/testdir/screendump.vim @@ -118,7 +118,12 @@ func VerifyScreenDump(buf, filename, opt call delete(testfile) call term_dumpwrite(a:buf, testfile, a:options) let testdump = readfile(testfile) - let refdump = readfile(reference) + if filereadable(reference) + let refdump = readfile(reference) + else + " Must be a new screendump, always fail + let refdump = [] + endif if refdump == testdump call delete(testfile) if did_mkdir @@ -127,13 +132,17 @@ func VerifyScreenDump(buf, filename, opt break endif if i == 100 - " Leave the test file around for inspection. - let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")' - if a:0 == 1 - let msg = a:1 . ': ' . msg - endif - if len(testdump) != len(refdump) - let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump) + " Leave the failed dump around for inspection. + if filereadable(reference) + let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")' + if a:0 == 1 + let msg = a:1 . ': ' . msg + endif + if len(testdump) != len(refdump) + let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump) + endif + else + let msg = 'See new dump file: call term_dumpload("' . testfile . '")' endif for i in range(len(refdump)) if i >= len(testdump) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1129, +/**/ 1128, /**/ 1127,