summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/op/srand.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/srand.t b/t/op/srand.t
index 5753a5d0eb..34fa9af935 100644
--- a/t/op/srand.t
+++ b/t/op/srand.t
@@ -10,7 +10,7 @@ BEGIN {
use strict;
require "test.pl";
-plan(tests => 4);
+plan(tests => 5);
# Generate a load of random numbers.
# int() avoids possible floating point error.
@@ -57,3 +57,7 @@ sleep(1); # in case our srand() is too time-dependent
@second_run = `$^X -le "print int rand 100 for 1..100"`;
ok( !eq_array(\@first_run, \@second_run), 'srand() called automatically');
+
+# check srand's return value
+my $seed = srand(1764);
+is( $seed, 1764, "return value" );