summaryrefslogtreecommitdiff
path: root/mnv/src/testdir/util/screendump.mnv
diff options
context:
space:
mode:
Diffstat (limited to 'mnv/src/testdir/util/screendump.mnv')
-rw-r--r--mnv/src/testdir/util/screendump.mnv16
1 files changed, 14 insertions, 2 deletions
diff --git a/mnv/src/testdir/util/screendump.mnv b/mnv/src/testdir/util/screendump.mnv
index 2f28c759a8..91346911a1 100644
--- a/mnv/src/testdir/util/screendump.mnv
+++ b/mnv/src/testdir/util/screendump.mnv
@@ -165,7 +165,11 @@ func VerifyScreenDump(buf, filename, options, ...)
" Leave a bit of time for updating the original window while we spin wait.
sleep 10m
call delete(testfile)
- call term_dumpwrite(a:buf, testfile, options_copy)
+ try
+ call term_dumpwrite(a:buf, testfile, options_copy)
+ catch /E958/
+ return 1
+ endtry
call assert_report('See new dump file: call term_dumpload("testdir/' .. testfile .. '")')
" No point in retrying.
let g:run_nr = 10
@@ -179,7 +183,15 @@ func VerifyScreenDump(buf, filename, options, ...)
" Leave a bit of time for updating the original window while we spin wait.
sleep 1m
call delete(testfile)
- call term_dumpwrite(a:buf, testfile, options_copy)
+ try
+ call term_dumpwrite(a:buf, testfile, options_copy)
+ catch /E958/
+ " The terminal job already finished; no point retrying.
+ return 1
+ endtry
+ if !filereadable(testfile)
+ return 1
+ endif
" Filtering done with "FileComparisonPreAction()" may change "refdump*".
let refdump = CopyStringList(refdump_orig)
let testdump = ReadAndFilter(testfile, filter)