aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorAntero Mejr <antero@mailbox.org>2023-06-04 17:42:06 +0000
committerDanny Milosavljevic <dannym@friendly-machines.com>2024-12-22 13:12:39 +0100
commit490def939412143c4b94f02a15a601ba289dfe9b (patch)
tree2f7daff988809c8202596374c879298bba66bb32 /gnu/packages
parent95b4594a2ed19e6e1553a1b2a581391ef1b8eaa3 (diff)
downloadguix-490def939412143c4b94f02a15a601ba289dfe9b.tar.gz
guix-490def939412143c4b94f02a15a601ba289dfe9b.zip
gnu: Add perl-test-mockrandom.
* gnu/packages/perl-check.scm (perl-test-mockrandom): New variable. Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/perl-check.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/perl-check.scm b/gnu/packages/perl-check.scm
index 7672e82f9b..e1eb5a0764 100644
--- a/gnu/packages/perl-check.scm
+++ b/gnu/packages/perl-check.scm
@@ -963,6 +963,33 @@ to particular interfaces with very little code. You don't have to reimplement
the behavior, just the input and the output.")
(license perl-license)))
+(define-public perl-test-mockrandom
+ (package
+ (name "perl-test-mockrandom")
+ (version "1.01")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/D/DA/DAGOLDEN/Test-MockRandom-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1q6c474ya9najgj4wzgj0waj56ykrj3fxhgvkb1ylpgwhh6r6516"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/Test-MockRandom")
+ (synopsis
+ "Replaces random number generation with non-random number generation")
+ (description
+ "This module can test routines that manipulate random numbers by
+providing a known output from @code{rand}. Given a list of seeds with
+@code{srand}, it will return each in turn. After seeded random numbers are
+exhausted, it will always return 0. Seed numbers must be of a form that
+meets the expected output from @code{rand} as called with no arguments: they
+must be between 0 (inclusive) and 1 (exclusive). In order to facilitate
+generating and testing a nearly-one number, this module exports the function
+@code{oneish}, which returns a number just fractionally less than one.")
+ (license asl2.0)))
+
(define-public perl-test-mocktime
(package
(name "perl-test-mocktime")