patch 8.2.0233: crash when using garbagecollect() in between rand()

Problem:    Crash when using garbagecollect() in between rand().
Solution:   Redesign the rand() and srand() implementation. (Yasuhiro
            Matsumoto, closes #5587, closes #5588)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 26e7d12..afbfd9f 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2867,6 +2867,7 @@
 test_scrollbar({which}, {value}, {dragging})
 				none	scroll in the GUI for testing
 test_setmouse({row}, {col})	none	set the mouse position for testing
+test_srand_seed([seed])		none	set seed for testing srand()
 test_settime({expr})		none	set current time for testing
 timer_info([{id}])		List	information about timers
 timer_pause({id}, {pause})	none	pause or unpause a timer
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index 7fb24e6..f2a7cf1 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -210,7 +210,6 @@
 			call test_setmouse(4, 20)
 			call feedkeys("\<LeftMouse>", "xt")
 
-
 test_settime({expr})					*test_settime()*
 		Set the time Vim uses internally.  Currently only used for
 		timestamps in the history, as they are used in viminfo, and
@@ -223,6 +222,10 @@
 		Can also be used as a |method|: >
 			GetTime()->test_settime()
 
+test_srand_seed([seed])					*test_srand_seed()*
+		When [seed] is given this sets the seed value used by
+		`srand()`.  When omitted the test seed is removed.
+
 ==============================================================================
 3. Assert functions				*assert-functions-details*