summaryrefslogtreecommitdiff
path: root/tests/random.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/random.scm')
-rw-r--r--tests/random.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/random.scm b/tests/random.scm
new file mode 100644
index 0000000..9b85b15
--- /dev/null
+++ b/tests/random.scm
@@ -0,0 +1,17 @@
+(use-modules (webid-oidc stubs)
+ (webid-oidc testing))
+
+(with-test-environment
+ "random"
+ (lambda ()
+ (let ((data (random 12))
+ (expected "68OMG_V5x-KmI6TI"))
+ (unless (string=? data expected)
+ (format (current-error-port)
+ "Non-reproducibility issue with the random number generator:
+expected: ~a
+obtained: ~a
+"
+ expected
+ data)
+ (exit 1)))))