1
0
forked from aniani/vim

patch 8.1.0964: cannot see in CI why a screenshot test failed

Problem:    Cannot see in CI why a screenshot test failed.
Solution:   Add info about the failure.
This commit is contained in:
Bram Moolenaar
2019-02-21 17:05:59 +01:00
parent 4a7d2d3b40
commit 353aca1215
2 changed files with 16 additions and 1 deletions

View File

@@ -111,7 +111,9 @@ func VerifyScreenDump(buf, filename, options, ...)
sleep 10m
call delete(testfile)
call term_dumpwrite(a:buf, testfile, a:options)
if readfile(reference) == readfile(testfile)
let testdump = readfile(testfile)
let refdump = readfile(reference)
if refdump == testdump
call delete(testfile)
break
endif
@@ -121,6 +123,17 @@ func VerifyScreenDump(buf, filename, options, ...)
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
for i in range(len(refdump))
if i >= len(testdump)
break
endif
if testdump[i] != refdump[i]
let msg = msg . '; difference in line ' . (i + 1) . ': "' . testdump[i] . '"'
endif
endfor
call assert_report(msg)
return 1
endif

View File

@@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
964,
/**/
963,
/**/