This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70e5f2b
)
[perl #118237] Fix coreamp.t’s rand test
author
Father Chrysostomos
<sprout@cpan.org>
Sun, 2 Jun 2013 07:36:33 +0000
(
00:36
-0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sun, 2 Jun 2013 07:38:07 +0000
(
00:38
-0700)
when rand returns something really small that does not
begin with 0, such as 2.
90736361456823e
-05.
t/op/coreamp.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/coreamp.t
b/t/op/coreamp.t
index
c1f7181
..
fe7c741
100644
(file)
--- a/
t/op/coreamp.t
+++ b/
t/op/coreamp.t
@@
-637,7
+637,7
@@
test_proto 'quotemeta', '$', '\$';
test_proto 'rand';
$tests += 3;
-like &CORE::rand, qr/^
0
[.\d+-e]*\z/, '&rand';
+like &CORE::rand, qr/^[.\d+-e]*\z/, '&rand';
unlike join(" ", &CORE::rand), qr/ /, '&rand in list context';
&cmp_ok(&CORE::rand(78), qw '< 78', '&rand with 1 arg');