mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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.
This commit is contained in:
parent
94a7242ad1
commit
2d7260d665
@ -118,7 +118,12 @@ func VerifyScreenDump(buf, filename, options, ...)
|
|||||||
call delete(testfile)
|
call delete(testfile)
|
||||||
call term_dumpwrite(a:buf, testfile, a:options)
|
call term_dumpwrite(a:buf, testfile, a:options)
|
||||||
let testdump = readfile(testfile)
|
let testdump = readfile(testfile)
|
||||||
|
if filereadable(reference)
|
||||||
let refdump = readfile(reference)
|
let refdump = readfile(reference)
|
||||||
|
else
|
||||||
|
" Must be a new screendump, always fail
|
||||||
|
let refdump = []
|
||||||
|
endif
|
||||||
if refdump == testdump
|
if refdump == testdump
|
||||||
call delete(testfile)
|
call delete(testfile)
|
||||||
if did_mkdir
|
if did_mkdir
|
||||||
@ -127,7 +132,8 @@ func VerifyScreenDump(buf, filename, options, ...)
|
|||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
if i == 100
|
if i == 100
|
||||||
" Leave the test file around for inspection.
|
" Leave the failed dump around for inspection.
|
||||||
|
if filereadable(reference)
|
||||||
let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
|
let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
|
||||||
if a:0 == 1
|
if a:0 == 1
|
||||||
let msg = a:1 . ': ' . msg
|
let msg = a:1 . ': ' . msg
|
||||||
@ -135,6 +141,9 @@ func VerifyScreenDump(buf, filename, options, ...)
|
|||||||
if len(testdump) != len(refdump)
|
if len(testdump) != len(refdump)
|
||||||
let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump)
|
let msg = msg . '; line count is ' . len(testdump) . ' instead of ' . len(refdump)
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
let msg = 'See new dump file: call term_dumpload("' . testfile . '")'
|
||||||
|
endif
|
||||||
for i in range(len(refdump))
|
for i in range(len(refdump))
|
||||||
if i >= len(testdump)
|
if i >= len(testdump)
|
||||||
break
|
break
|
||||||
|
@ -771,6 +771,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1129,
|
||||||
/**/
|
/**/
|
||||||
1128,
|
1128,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user