5 unshift @INC, '../lib';
10 $runme = ($^O eq 'VMS' ? 'MCR ' : '') . $^X;
15 open OP, qq{$runme -le "print 'aaa Ok ok' for 1..100"|};
17 @chopar = (113 .. 119);
25 print "1..", (8 + @INPUT), "\n";
30 # Check correct optimization of ucfirst etc
34 print "not " unless $b eq 'Ab';
37 # Check correct destruction of objects:
39 sub A::DESTROY {$dc += 1}
42 { my $c = 6; $b = bless \$c, "A"}
45 print "not " unless $dc == 0;
51 print "not " unless $dc == 1;
54 { # Check calling STORE
56 sub B::TIESCALAR {bless [11], 'B'}
57 sub B::FETCH { -(shift->[0]) }
58 sub B::STORE { $sc++; my $o = shift; $o->[0] = 17 + shift }
65 print "not " unless $sc == 1;
72 print "not " unless $sc == 2;
76 print "# $m\nnot " unless $m == -117;
82 print "not " unless $sc == 3;
86 print "# $m\nnot " unless $m == 89;
93 ($op, undef, $comment) = /^([^\#]+)(\#\s+(.*))?/;
94 $comment = $op unless defined $comment;
95 $op = "$op==$op" unless $op =~ /==/;
96 ($op, $expectop) = $op =~ /(.*)==(.*)/;
98 $skip = ($op =~ /^'\?\?\?'/ or $comment =~ /skip\(.*\Q$^O\E.*\)/i)
100 $integer = ($comment =~ /^i_/) ? "use integer" : '' ;
101 (print "#skipping $comment:\nok $ord\n"), next if $skip eq 'skip';
104 local \$SIG{__WARN__} = \\&wrn;
110 print "# \$comment: got `\$a', expected `\$b'\n";
111 print "\$skip " if \$a ne \$b or \$skip eq 'skip';
116 if ($@ =~ /is unimplemented/) {
117 print "# skipping $comment: unimplemented:\nok $ord\n";
120 print "not ok $ord\n";
126 ref $cstr # ref nonref
127 `$runme -e "print qq[1\n]"` # backtick skip(MSWin32)
128 `$undefed` # backtick undef skip(MSWin32)
132 (@z = (1 .. 3)) # aassign
134 (chop (@x=@chopar)) # schop
135 chomp $chopit # chomp
136 (chop (@x=@chopar)) # schomp
138 pos $chopit # pos returns undef
156 $n . $a=='2fake' # concat with self
157 "3$a"=='3fake' # concat with self in stringify
159 $n << $n # left_shift
160 $n >> $n # right_shift
181 length $posstr # length
182 substr $posstr, 2, 2 # substr
184 index $posstr, 2 # index
185 rindex $posstr, 2 # rindex
186 sprintf "%i%i", $n, $n # sprintf
190 ucfirst ($cstr . "a") # ucfirst padtmp
191 ucfirst $cstr # ucfirst
192 lcfirst $cstr # lcfirst
195 quotemeta $cstr # quotemeta
197 @$undefed # rv2av undef
202 pack "C2", $n,$n # pack
203 split /a/, "abad" # split
206 unshift @aaa # unshift
208 reverse $cstr # reverse - scal
209 grep $_, 1,0,2,0,3 # grepwhile
210 map "x$_", 1,0,2,0,3 # mapwhile
213 warn "ignore this\n" # warn
215 open BLAH, "<non-existent" # open
216 fileno STDERR # fileno
218 select STDOUT # sselect
219 select "","","",0 # select
236 chdir 'non-existent' # chdir
239 unlink 'non-existent' # unlink
240 chmod 'non-existent' # chmod
241 utime 'non-existent' # utime
242 rename 'non-existent', 'non-existent1' # rename
243 link 'non-existent', 'non-existent1' # link
245 readlink 'non-existent', 'non-existent1' # readlink
252 system "$runme -e 0" # system skip(VMS)
258 getpriority $$, $$ # getpriority
261 localtime $^T # localtime