diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-30 15:59:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-30 15:59:51 +0100 |
commit | ef7f0e367eeaf6fb31b1caa0e3de1a4b07e86af3 (patch) | |
tree | 61cbe5caf5d62317402704e6e21d3b05265d4c6f /src | |
parent | 48aed0824e47147faf19fc235ad4bcf851584c9c (diff) |
patch 8.1.1080: when a screendump test fails, moving the file is a hasslev8.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.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/screendump.vim | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim index cea0e1b17f..2d317fe161 100644 --- a/src/testdir/screendump.vim +++ b/src/testdir/screendump.vim @@ -103,7 +103,13 @@ endfunc " Returns non-zero when verification fails. func VerifyScreenDump(buf, filename, options, ...) let reference = 'dumps/' . a:filename . '.dump' - let testfile = a:filename . '.dump.failed' + 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,6 +121,9 @@ func VerifyScreenDump(buf, filename, options, ...) let refdump = readfile(reference) if refdump == testdump call delete(testfile) + if did_mkdir + call delete('failed', 'd') + endif break endif if i == 100 diff --git a/src/version.c b/src/version.c index d8a65cd3b0..508736a44b 100644 --- a/src/version.c +++ b/src/version.c @@ -776,6 +776,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1080, +/**/ 1079, /**/ 1078, |