Small optimisations, by Brandon Black
[p5sagit/p5-mst-13.2.git] / t / op / sselect.t
CommitLineData
729c079f 1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = ('.', '../lib');
6}
7
8require 'test.pl';
9
15547071 10plan (9);
729c079f 11
12my $blank = "";
13eval {select undef, $blank, $blank, 0};
14is ($@, "");
15eval {select $blank, undef, $blank, 0};
16is ($@, "");
17eval {select $blank, $blank, undef, 0};
18is ($@, "");
19
20eval {select "", $blank, $blank, 0};
15547071 21is ($@, "");
729c079f 22eval {select $blank, "", $blank, 0};
15547071 23is ($@, "");
729c079f 24eval {select $blank, $blank, "", 0};
15547071 25is ($@, "");
26
27eval {select "a", $blank, $blank, 0};
28like ($@, qr/^Modification of a read-only value attempted/);
29eval {select $blank, "a", $blank, 0};
30like ($@, qr/^Modification of a read-only value attempted/);
31eval {select $blank, $blank, "a", 0};
729c079f 32like ($@, qr/^Modification of a read-only value attempted/);