diff options
author | David Mitchell <davem@iabyn.com> | 2011-06-09 16:15:36 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-06-09 16:15:36 +0100 |
commit | 8075d46ebf11d41b9aa800b7903b2b3654b7d0a0 (patch) | |
tree | f4540cb89ae5d6b20c0c3e5ae166ee29535cabd5 /t | |
parent | 565aeffea0ac99fb06cfbf215e201ce62b405a61 (diff) | |
download | perl-8075d46ebf11d41b9aa800b7903b2b3654b7d0a0.tar.gz |
t/op/sselect.t: add descriptions to ok() tests
Diffstat (limited to 't')
-rw-r--r-- | t/op/sselect.t | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/t/op/sselect.t b/t/op/sselect.t index ffb4aadcf1..e68f3394b3 100644 --- a/t/op/sselect.t +++ b/t/op/sselect.t @@ -11,25 +11,28 @@ plan (11); my $blank = ""; eval {select undef, $blank, $blank, 0}; -is ($@, ""); +is ($@, "", 'select undef $blank $blank 0'); eval {select $blank, undef, $blank, 0}; -is ($@, ""); +is ($@, "", 'select $blank undef $blank 0'); eval {select $blank, $blank, undef, 0}; -is ($@, ""); +is ($@, "", 'select $blank $blank undef 0'); eval {select "", $blank, $blank, 0}; -is ($@, ""); +is ($@, "", 'select "" $blank $blank 0'); eval {select $blank, "", $blank, 0}; -is ($@, ""); +is ($@, "", 'select $blank "" $blank 0'); eval {select $blank, $blank, "", 0}; -is ($@, ""); +is ($@, "", 'select $blank $blank "" 0'); eval {select "a", $blank, $blank, 0}; -like ($@, qr/^Modification of a read-only value attempted/); +like ($@, qr/^Modification of a read-only value attempted/, + 'select "a" $blank $blank 0'); eval {select $blank, "a", $blank, 0}; -like ($@, qr/^Modification of a read-only value attempted/); +like ($@, qr/^Modification of a read-only value attempted/, + 'select $blank "a" $blank 0'); eval {select $blank, $blank, "a", 0}; -like ($@, qr/^Modification of a read-only value attempted/); +like ($@, qr/^Modification of a read-only value attempted/, + 'select $blank $blank "a" 0'); my($sleep,$fudge) = (3,0); # Actual sleep time on Windows may be rounded down to an integral @@ -41,10 +44,10 @@ my($sleep,$fudge) = (3,0); my $t = time; select(undef, undef, undef, $sleep); -ok(time-$t >= $sleep-$fudge, "$sleep seconds have passed"); +ok(time-$t >= $sleep-$fudge, "select(u,u,u,\$sleep): $sleep seconds have passed"); my $empty = ""; vec($empty,0,1) = 0; $t = time; select($empty, undef, undef, $sleep); -ok(time-$t >= $sleep-$fudge, "$sleep seconds have passed"); +ok(time-$t >= $sleep-$fudge, "select(\$e,u,u,\$sleep): $sleep seconds have passed"); |