aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2006-07-26 04:58:24 +0800
committerehaupt <ehaupt@FreeBSD.org>2006-07-26 04:58:24 +0800
commit14b6d30f17cf21fc28b5f351bb44ff99ca418fa4 (patch)
treecc9b804e48790a74cc6109754da786ab1eb45367 /devel
parentf4942a53fef15b0087b64d43773726d3317f1e74 (diff)
downloadfreebsd-ports-gnome-14b6d30f17cf21fc28b5f351bb44ff99ca418fa4.tar.gz
freebsd-ports-gnome-14b6d30f17cf21fc28b5f351bb44ff99ca418fa4.tar.zst
freebsd-ports-gnome-14b6d30f17cf21fc28b5f351bb44ff99ca418fa4.zip
Add p5-Test-MockRandom 0.99, replaces random number generation with
non-random number generation. PR: 100749 Submitted by: Jin-Shan Tseng <tjs at cdpa.nsysu.edu.tw>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-Test-MockRandom/Makefile22
-rw-r--r--devel/p5-Test-MockRandom/distinfo3
-rw-r--r--devel/p5-Test-MockRandom/pkg-descr20
-rw-r--r--devel/p5-Test-MockRandom/pkg-plist5
5 files changed, 51 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 70b6f0edbebc..ba98e6c6d671 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1348,6 +1348,7 @@
SUBDIR += p5-Test-Manifest
SUBDIR += p5-Test-MockModule
SUBDIR += p5-Test-MockObject
+ SUBDIR += p5-Test-MockRandom
SUBDIR += p5-Test-NoWarnings
SUBDIR += p5-Test-Number-Delta
SUBDIR += p5-Test-Output
diff --git a/devel/p5-Test-MockRandom/Makefile b/devel/p5-Test-MockRandom/Makefile
new file mode 100644
index 000000000000..ceace55f991d
--- /dev/null
+++ b/devel/p5-Test-MockRandom/Makefile
@@ -0,0 +1,22 @@
+# New Ports Collection Makefile for: p5-Test-MockRandom
+# Date created: 2006-07-23
+# Whom: Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
+# $FreeBSD$
+
+PORTNAME= Test-MockRandom
+PORTVERSION= 0.99
+CATEGORIES= devel perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Test
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= tjs@cdpa.nsysu.edu.tw
+COMMENT= Replaces random number generation with non-random number generation
+
+BUILD_DEPENDS= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
+
+PERL_CONFIGURE= yes
+
+MAN3= Test::MockRandom.3
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Test-MockRandom/distinfo b/devel/p5-Test-MockRandom/distinfo
new file mode 100644
index 000000000000..4d89f4d7f78d
--- /dev/null
+++ b/devel/p5-Test-MockRandom/distinfo
@@ -0,0 +1,3 @@
+MD5 (Test-MockRandom-0.99.tar.gz) = 8852d9674c670d8309064c98f7b3e2a5
+SHA256 (Test-MockRandom-0.99.tar.gz) = 0978a6ddea5cfa76f22b1c1732020d7f8d4b5cf06246085442f9c96568dc226e
+SIZE (Test-MockRandom-0.99.tar.gz) = 17649
diff --git a/devel/p5-Test-MockRandom/pkg-descr b/devel/p5-Test-MockRandom/pkg-descr
new file mode 100644
index 000000000000..88e06ce89183
--- /dev/null
+++ b/devel/p5-Test-MockRandom/pkg-descr
@@ -0,0 +1,20 @@
+This perhaps ridiculous-seeming module was created to test routines that
+manipulate random numbers by providing a known output from rand. Given a list of
+seeds with 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 rand as called with no arguments -- i.e. 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 oneish, which
+returns a number just fractionally less than one.
+
+Depending on how this module is called with use, it will export rand to a
+specified package (e.g. a class being tested) effectively overriding and
+intercepting calls in that package to the built-in rand. It can also override
+rand in the current package or even globally. In all of these cases, it also
+exports srand and oneish to the current package in order to control the output
+of rand.
+
+Alternatively, this module can be used to generate objects, with each object
+maintaining its own distinct seed array.
+
+WWW: http://search.cpan.org/dist/Test-MockRandom/
diff --git a/devel/p5-Test-MockRandom/pkg-plist b/devel/p5-Test-MockRandom/pkg-plist
new file mode 100644
index 000000000000..f2ffa9960c52
--- /dev/null
+++ b/devel/p5-Test-MockRandom/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom/.packlist
+%%SITE_PERL%%/Test/MockRandom.pm
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test
+@dirrmtry %%SITE_PERL%%/Test