patch 8.2.4234: test_garbagecollect_now() does not check v:testing
Problem: test_garbagecollect_now() does not check v:testing as documented.
Solution: Give an error if v:testing is not set.
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 917e89f..ff07916 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2663,6 +2663,12 @@
call assert_fails('let x=range(1, 4, [])', 'E745:')
endfunc
+func Test_garbagecollect_now_fails()
+ let v:testing = 0
+ call assert_fails('call test_garbagecollect_now()', 'E1142:')
+ let v:testing = 1
+endfunc
+
func Test_echoraw()
CheckScreendump