Various buglets shaken out by -Mutf8.
[p5sagit/p5-mst-13.2.git] / t / lib / u-blessed.t
CommitLineData
f4a2945e 1BEGIN {
2 chdir 't' if -d 't';
3 @INC = '../lib';
6b05f64e 4 require Config; import Config;
5 if ($Config{extensions} !~ /\bList\/Util\b/) {
6 print "1..0 # Skip: List::Util was not built\n";
7 exit 0;
8 }
f4a2945e 9}
10
11use Scalar::Util qw(blessed);
12use vars qw($t $y $x);
13
14print "1..7\n";
15
16print "not " if blessed(1);
17print "ok 1\n";
18
19print "not " if blessed('A');
20print "ok 2\n";
21
22print "not " if blessed({});
23print "ok 3\n";
24
25print "not " if blessed([]);
26print "ok 4\n";
27
28$y = \$t;
29
30print "not " if blessed($y);
31print "ok 5\n";
32
33$x = bless [], "ABC";
34
35print "not " unless blessed($x);
36print "ok 6\n";
37
38print "not " unless blessed($x) eq 'ABC';
39print "ok 7\n";