patch 7.4.1727
Problem: Cannot detect a crash in tests when caused by garbagecollect().
Solution: Add garbagecollect_for_testing(). Do not free a job if is still
useful.
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 4d75af3..2b38981 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -60,6 +60,9 @@
let s:srcdir = expand('%:p:h:h')
+" Prepare for calling garbagecollect_for_testing().
+let v:testing = 1
+
" Support function: get the alloc ID by name.
function GetAllocId(name)
exe 'split ' . s:srcdir . '/alloc.h'