From 4124c914a6b91e2c9903a17918e6be5feeb35bf7 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Thu, 27 May 2004 11:54:27 +0000
Subject: [PATCH] Tweak the random state printing test so that rs1 is a copy of
 the random state.  This protects against the possibility that *random-sate*
 is being modified elsewhere in the background during the test.

---
 ansi-tests/print-random-state.lsp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/ansi-tests/print-random-state.lsp b/ansi-tests/print-random-state.lsp
index 79fc8cba..30a74599 100644
--- a/ansi-tests/print-random-state.lsp
+++ b/ansi-tests/print-random-state.lsp
@@ -8,11 +8,13 @@
 (compile-and-load "printer-aux.lsp")
 
 (deftest print.random-state.1
-  (let* ((rs1 *random-state*)
-	 (rs2 (with-standard-io-syntax
-	       (read-from-string
-		(write-to-string rs1 :readably t)))))
-    (values
-     (notnot (random-state-p rs2))
-     (is-similar rs1 rs2)))
-  t t)
+  (loop repeat 100
+	nconc
+	(let* ((rs1 (make-random-state *random-state*))
+	       (rs2 (with-standard-io-syntax
+		     (read-from-string
+		      (write-to-string rs1 :readably t))))
+	       (result (list (notnot (random-state-p rs2))
+			     (is-similar rs1 rs2))))
+	  (unless (equal result '(t t)) (list result rs1 rs2))))
+  nil)
-- 
GitLab