Move the UTF-8 conversion code earlier so that
[p5sagit/p5-mst-13.2.git] / t / run / kill_perl.t
CommitLineData
a0d0e21e 1#!./perl
2
eeabcb2d 3# ** DO NOT ADD ANY MORE TESTS HERE **
4# Instead, put the test in the appropriate test file and use the
5# kill_perl() function in t/test.pl.
6
c9beb3f5 7# This is for tests that will normally cause segfaults, and other nasty
8# errors that might kill the interpreter and for some reason you can't
9# use an eval().
10#
11# New tests are added to the bottom. For example.
12#
13# ######## perlbug ID 20020831.001
14# ($a, b) = (1,2)
15# EXPECT
16# Can't modify constant item in list assignment - at line 1
17#
18# to test that the code "($a, b) = (1,2)" causes the appropriate syntax
19# error, rather than just segfaulting as reported in perlbug ID
20# 20020831.001
fb73857a 21
c9beb3f5 22BEGIN {
23 chdir 't' if -d 't';
24 @INC = '../lib';
b5fe401b 25 require './test.pl';
c9beb3f5 26}
27
28use strict;
a0d0e21e 29
b5fe401b 30my $Perl = which_perl;
31
a0d0e21e 32$|=1;
33
c9beb3f5 34my @prgs = ();
35while(<DATA>) {
36 if(m/^#{8,}\s*(.*)/) {
37 push @prgs, ['', $1];
38 }
39 else {
40 $prgs[-1][0] .= $_;
41 }
42}
eeabcb2d 43plan tests => scalar @prgs;
a0d0e21e 44
c9beb3f5 45foreach my $prog (@prgs) {
46 my($raw_prog, $name) = @$prog;
68dc0745 47
a0d0e21e 48 my $switch;
c9beb3f5 49 if ($raw_prog =~ s/^\s*(-\w.*)//){
fb73857a 50 $switch = $1;
a0d0e21e 51 }
c9beb3f5 52
53 my($prog,$expected) = split(/\nEXPECT\n/, $raw_prog);
54
8da5ed17 55 kill_perl($prog, $expected, { switches => [$switch] }, $name);
a0d0e21e 56}
57
58__END__
2ace3117 59########
44a8e56a 60$a = ":="; split /($a)/o, "a:=b:=c"; print "@_"
61EXPECT
62a := b := c
63########
36477c24 64$cusp = ~0 ^ (~0 >> 1);
85e0ebd8 65use integer;
36477c24 66$, = " ";
85e0ebd8 67print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, 8 | (($cusp + 1) % 8 + 7), "!\n";
36477c24 68EXPECT
85e0ebd8 697 0 0 8 !
36477c24 70########
a0d0e21e 71$foo=undef; $foo->go;
72EXPECT
72b5445b 73Can't call method "go" on an undefined value at - line 1.
a0d0e21e 74########
75BEGIN
76 {
77 "foo";
78 }
79########
a0d0e21e 80$array[128]=1
81########
82$x=0x0eabcd; print $x->ref;
83EXPECT
84Can't call method "ref" without a package or object reference at - line 1.
85########
648cac19 86chop ($str .= <DATA>);
a0d0e21e 87########
88close ($banana);
89########
90$x=2;$y=3;$x<$y ? $x : $y += 23;print $x;
91EXPECT
9225
93########
94eval {sub bar {print "In bar";}}
95########
68dc0745 96system './perl -ne "print if eof" /dev/null'
a0d0e21e 97########
648cac19 98chop($file = <DATA>);
a0d0e21e 99########
100package N;
101sub new {my ($obj,$n)=@_; bless \$n}
102$aa=new N 1;
103$aa=12345;
104print $aa;
105EXPECT
10612345
107########
108%@x=0;
109EXPECT
f1612b5c 110Can't modify hash dereference in repeat (x) at - line 1, near "0;"
3fe9a6f1 111Execution of - aborted due to compilation errors.
a0d0e21e 112########
113$_="foo";
114printf(STDOUT "%s\n", $_);
115EXPECT
116foo
117########
118push(@a, 1, 2, 3,)
119########
120quotemeta ""
121########
122for ("ABCDE") {
123 &sub;
124s/./&sub($&)/eg;
125print;}
126sub sub {local($_) = @_;
127$_ x 4;}
128EXPECT
129Modification of a read-only value attempted at - line 3.
130########
131package FOO;sub new {bless {FOO => BAR}};
132package main;
133use strict vars;
134my $self = new FOO;
135print $$self{FOO};
136EXPECT
137BAR
138########
139$_="foo";
140s/.{1}//s;
141print;
142EXPECT
143oo
144########
145print scalar ("foo","bar")
146EXPECT
147bar
148########
149sub by_number { $a <=> $b; };# inline function for sort below
150$as_ary{0}="a0";
151@ordered_array=sort by_number keys(%as_ary);
152########
153sub NewShell
154{
155 local($Host) = @_;
156 my($m2) = $#Shells++;
157 $Shells[$m2]{HOST} = $Host;
158 return $m2;
159}
160
161sub ShowShell
162{
163 local($i) = @_;
164}
165
166&ShowShell(&NewShell(beach,Work,"+0+0"));
167&ShowShell(&NewShell(beach,Work,"+0+0"));
168&ShowShell(&NewShell(beach,Work,"+0+0"));
169########
170 {
171 package FAKEARRAY;
172
173 sub TIEARRAY
174 { print "TIEARRAY @_\n";
175 die "bomb out\n" unless $count ++ ;
176 bless ['foo']
177 }
178 sub FETCH { print "fetch @_\n"; $_[0]->[$_[1]] }
179 sub STORE { print "store @_\n"; $_[0]->[$_[1]] = $_[2] }
180 sub DESTROY { print "DESTROY \n"; undef @{$_[0]}; }
181 }
182
183eval 'tie @h, FAKEARRAY, fred' ;
184tie @h, FAKEARRAY, fred ;
185EXPECT
186TIEARRAY FAKEARRAY fred
187TIEARRAY FAKEARRAY fred
188DESTROY
189########
190BEGIN { die "phooey\n" }
191EXPECT
192phooey
193BEGIN failed--compilation aborted at - line 1.
194########
195BEGIN { 1/$zero }
196EXPECT
197Illegal division by zero at - line 1.
198BEGIN failed--compilation aborted at - line 1.
199########
200BEGIN { undef = 0 }
201EXPECT
202Modification of a read-only value attempted at - line 1.
203BEGIN failed--compilation aborted at - line 1.
a7adf1f0 204########
205{
206 package foo;
207 sub PRINT {
208 shift;
209 print join(' ', reverse @_)."\n";
210 }
46fc3d4c 211 sub PRINTF {
212 shift;
213 my $fmt = shift;
214 print sprintf($fmt, @_)."\n";
215 }
a7adf1f0 216 sub TIEHANDLE {
217 bless {}, shift;
218 }
58f51617 219 sub READLINE {
220 "Out of inspiration";
221 }
a7adf1f0 222 sub DESTROY {
223 print "and destroyed as well\n";
2ae324a7 224 }
225 sub READ {
226 shift;
227 print STDOUT "foo->can(READ)(@_)\n";
228 return 100;
229 }
230 sub GETC {
231 shift;
232 print STDOUT "Don't GETC, Get Perl\n";
233 return "a";
234 }
a7adf1f0 235}
236{
237 local(*FOO);
238 tie(*FOO,'foo');
239 print FOO "sentence.", "reversed", "a", "is", "This";
58f51617 240 print "-- ", <FOO>, " --\n";
2ae324a7 241 my($buf,$len,$offset);
242 $buf = "string";
243 $len = 10; $offset = 1;
244 read(FOO, $buf, $len, $offset) == 100 or die "foo->READ failed";
245 getc(FOO) eq "a" or die "foo->GETC failed";
46fc3d4c 246 printf "%s is number %d\n", "Perl", 1;
a7adf1f0 247}
248EXPECT
249This is a reversed sentence.
58f51617 250-- Out of inspiration --
2ae324a7 251foo->can(READ)(string 10 1)
252Don't GETC, Get Perl
46fc3d4c 253Perl is number 1
a7adf1f0 254and destroyed as well
a6006777 255########
256my @a; $a[2] = 1; for (@a) { $_ = 2 } print "@a\n"
257EXPECT
2582 2 2
259########
8ff950ac 260# used to attach defelem magic to all immortal values,
8b530633 261# which made restore of local $_ fail.
262foo(2>1);
263sub foo { bar() for @_; }
264sub bar { local $_; }
265print "ok\n";
266EXPECT
267ok
268########
a6006777 269@a = ($a, $b, $c, $d) = (5, 6);
270print "ok\n"
271 if ($a[0] == 5 and $a[1] == 6 and !defined $a[2] and !defined $a[3]);
272EXPECT
273ok
274########
275print "ok\n" if (1E2<<1 == 200 and 3E4<<3 == 240000);
276EXPECT
277ok
278########
8ebc5c01 279print "ok\n" if ("\0" lt "\xFF");
a6006777 280EXPECT
281ok
282########
9731f9ce 283open(H,'run/kill_perl.t'); # must be in the 't' directory
a6006777 284stat(H);
285print "ok\n" if (-e _ and -f _ and -r _);
286EXPECT
287ok
288########
289sub thing { 0 || return qw(now is the time) }
290print thing(), "\n";
291EXPECT
292nowisthetime
293########
294$ren = 'joy';
295$stimpy = 'happy';
296{ local $main::{ren} = *stimpy; print $ren, ' ' }
297print $ren, "\n";
298EXPECT
299happy joy
300########
301$stimpy = 'happy';
302{ local $main::{ren} = *stimpy; print ${'ren'}, ' ' }
303print +(defined(${'ren'}) ? 'oops' : 'joy'), "\n";
304EXPECT
305happy joy
306########
307package p;
308sub func { print 'really ' unless wantarray; 'p' }
309sub groovy { 'groovy' }
310package main;
311print p::func()->groovy(), "\n"
312EXPECT
313really groovy
314########
d53f8f1c 315@list = ([ 'one', 1 ], [ 'two', 2 ]);
316sub func { $num = shift; (grep $_->[1] == $num, @list)[0] }
317print scalar(map &func($_), 1 .. 3), " ",
318 scalar(map scalar &func($_), 1 .. 3), "\n";
319EXPECT
3202 3
321########
44a8e56a 322($k, $s) = qw(x 0);
323@{$h{$k}} = qw(1 2 4);
324for (@{$h{$k}}) { $s += $_; delete $h{$k} if ($_ == 2) }
325print "bogus\n" unless $s == 7;
326########
327my $a = 'outer';
328eval q[ my $a = 'inner'; eval q[ print "$a " ] ];
329eval { my $x = 'peace'; eval q[ print "$x\n" ] }
330EXPECT
331inner peace
774d564b 332########
333-w
334$| = 1;
335sub foo {
336 print "In foo1\n";
337 eval 'sub foo { print "In foo2\n" }';
338 print "Exiting foo1\n";
339}
340foo;
341foo;
342EXPECT
343In foo1
344Subroutine foo redefined at (eval 1) line 1.
345Exiting foo1
346In foo2
347########
348$s = 0;
349map {#this newline here tickles the bug
350$s += $_} (1,2,4);
351print "eat flaming death\n" unless ($s == 7);
1ca7b98a 352########
353sub foo { local $_ = shift; split; @_ }
354@x = foo(' x y z ');
355print "you die joe!\n" unless "@x" eq 'x y z';
c277df42 356########
357/(?{"{"})/ # Check it outside of eval too
358EXPECT
2cd61cdb 359Sequence (?{...}) not terminated or not {}-balanced at - line 1, within pattern
7253e4e3 360Sequence (?{...}) not terminated or not {}-balanced in regex; marked by <-- HERE in m/(?{ <-- HERE "{"})/ at - line 1.
c277df42 361########
362/(?{"{"}})/ # Check it outside of eval too
363EXPECT
d98d5fff 364Unmatched right curly bracket at (re_eval 1) line 1, at end of line
c277df42 365syntax error at (re_eval 1) line 1, near ""{"}"
2cd61cdb 366Compilation failed in regexp at - line 1.
0da4822f 367########
ff689196 368BEGIN { @ARGV = qw(a b c d e) }
0da4822f 369BEGIN { print "argv <@ARGV>\nbegin <",shift,">\n" }
370END { print "end <",shift,">\nargv <@ARGV>\n" }
371INIT { print "init <",shift,">\n" }
7d30b5c4 372CHECK { print "check <",shift,">\n" }
0da4822f 373EXPECT
ff689196 374argv <a b c d e>
0da4822f 375begin <a>
7d30b5c4 376check <b>
ff689196 377init <c>
378end <d>
379argv <e>
4599a1de 380########
3500f679 381-l
382# fdopen from a system descriptor to a system descriptor used to close
383# the former.
384open STDERR, '>&=STDOUT' or die $!;
75642110 385select STDOUT; $| = 1; print fileno STDOUT or die $!;
386select STDERR; $| = 1; print fileno STDERR or die $!;
3500f679 387EXPECT
3881
3892
390########
20408e3c 391-w
392sub testme { my $a = "test"; { local $a = "new test"; print $a }}
393EXPECT
394Can't localize lexical variable $a at - line 2.
395########
51ae5c03 396package X;
397sub ascalar { my $r; bless \$r }
398sub DESTROY { print "destroyed\n" };
399package main;
400*s = ascalar X;
401EXPECT
402destroyed
403########
404package X;
405sub anarray { bless [] }
406sub DESTROY { print "destroyed\n" };
407package main;
408*a = anarray X;
409EXPECT
410destroyed
411########
412package X;
413sub ahash { bless {} }
414sub DESTROY { print "destroyed\n" };
415package main;
416*h = ahash X;
417EXPECT
418destroyed
419########
420package X;
421sub aclosure { my $x; bless sub { ++$x } }
422sub DESTROY { print "destroyed\n" };
423package main;
424*c = aclosure X;
425EXPECT
426destroyed
427########
428package X;
429sub any { bless {} }
430my $f = "FH000"; # just to thwart any future optimisations
ded8aa31 431sub afh { select select ++$f; my $r = *{$f}{IO}; delete $X::{$f}; bless $r }
51ae5c03 432sub DESTROY { print "destroyed\n" }
433package main;
434$x = any X; # to bump sv_objcount. IO objs aren't counted??
435*f = afh X;
436EXPECT
437destroyed
438destroyed
439########
ebf99b04 440BEGIN {
441 $| = 1;
442 $SIG{__WARN__} = sub {
443 eval { print $_[0] };
444 die "bar\n";
445 };
446 warn "foo\n";
447}
448EXPECT
449foo
450bar
451BEGIN failed--compilation aborted at - line 8.
8feb4e9f 452########
453package X;
454@ISA='Y';
455sub new {
456 my $class = shift;
457 my $self = { };
458 bless $self, $class;
459 my $init = shift;
460 $self->foo($init);
461 print "new", $init;
462 return $self;
463}
464sub DESTROY {
465 my $self = shift;
466 print "DESTROY", $self->foo;
467}
468package Y;
469sub attribute {
470 my $self = shift;
471 my $var = shift;
472 if (@_ == 0) {
473 return $self->{$var};
474 } elsif (@_ == 1) {
475 $self->{$var} = shift;
476 }
477}
478sub AUTOLOAD {
479 $AUTOLOAD =~ /::([^:]+)$/;
480 my $method = $1;
481 splice @_, 1, 0, $method;
482 goto &attribute;
483}
484package main;
485my $x = X->new(1);
486for (2..3) {
487 my $y = X->new($_);
488 print $y->foo;
489}
490print $x->foo;
491EXPECT
492new1new22DESTROY2new33DESTROY31DESTROY1
dfad63ad 493########
494re();
495sub re {
14455d6c 496 my $re = join '', eval 'qr/(??{ $obj->method })/';
dfad63ad 497 $re;
498}
499EXPECT
1aff0e91 500########
501use strict;
502my $foo = "ZZZ\n";
503END { print $foo }
504EXPECT
505ZZZ
506########
507eval '
508use strict;
509my $foo = "ZZZ\n";
510END { print $foo }
511';
512EXPECT
513ZZZ
7399586d 514########
515-w
516if (@ARGV) { print "" }
517else {
518 if ($x == 0) { print "" } else { print $x }
519}
520EXPECT
b89fed5f 521Use of uninitialized value in numeric eq (==) at - line 4.
1d76a5c3 522########
523$x = sub {};
524foo();
525sub foo { eval { return }; }
526print "ok\n";
527EXPECT
528ok
07447971 529########
b0f2b690 530# moved to op/lc.t
07447971 531EXPECT
92d29cee 532########
533sub f { my $a = 1; my $b = 2; my $c = 3; my $d = 4; next }
534my $x = "foo";
535{ f } continue { print $x, "\n" }
536EXPECT
537foo
6a7129a1 538########
539sub C () { 1 }
540sub M { $_[0] = 2; }
541eval "C";
542M(C);
543EXPECT
544Modification of a read-only value attempted at - line 2.
00c29ff8 545########
546print qw(ab a\b a\\b);
547EXPECT
548aba\ba\b
dd8482fc 549########
c71fccf1 550# lexicals declared after the myeval() definition should not be visible
551# within it
552sub myeval { eval $_[0] }
553my $foo = "ok 2\n";
554myeval('sub foo { local $foo = "ok 1\n"; print $foo; }');
555die $@ if $@;
556foo();
557print $foo;
558EXPECT
559ok 1
560ok 2
561########
2090ab20 562# lexicals outside an eval"" should be visible inside subroutine definitions
563# within it
564eval <<'EOT'; die $@ if $@;
565{
566 my $X = "ok\n";
567 eval 'sub Y { print $X }'; die $@ if $@;
568 Y();
569}
570EOT
571EXPECT
572ok
573########
dd8482fc 574# This test is here instead of pragma/locale.t because
575# the bug depends on in the internal state of the locale
576# settings and pragma/locale messes up that state pretty badly.
577# We need a "fresh run".
c9f931b8 578BEGIN {
579 eval { require POSIX };
580 if ($@) {
581 exit(0); # running minitest?
582 }
583}
dd8482fc 584use Config;
585my $have_setlocale = $Config{d_setlocale} eq 'define';
dd8482fc 586$have_setlocale = 0 if $@;
587# Visual C's CRT goes silly on strings of the form "en_US.ISO8859-1"
588# and mingw32 uses said silly CRT
2986a63f 589$have_setlocale = 0 if (($^O eq 'MSWin32' || $^O eq 'NetWare') && $Config{cc} =~ /^(cl|gcc)/i);
dd8482fc 590exit(0) unless $have_setlocale;
591my @locales;
592if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
593 while(<LOCALES>) {
594 chomp;
595 push(@locales, $_);
596 }
597 close(LOCALES);
598}
599exit(0) unless @locales;
600for (@locales) {
601 use POSIX qw(locale_h);
602 use locale;
88e7acd2 603 setlocale(LC_NUMERIC, $_) or next;
dd8482fc 604 my $s = sprintf "%g %g", 3.1, 3.1;
605 next if $s eq '3.1 3.1' || $s =~ /^(3.+1) \1$/;
606 print "$_ $s\n";
607}
608EXPECT
b927783e 609########
610die qr(x)
611EXPECT
612(?-xism:x) at - line 1.
613########
7ef822cd 614# 20001210.003 mjd@plover.com
615format REMITOUT_TOP =
616FOO
617.
618
619format REMITOUT =
620BAR
621.
622
623# This loop causes a segv in 5.6.0
624for $lineno (1..61) {
625 write REMITOUT;
626}
627
628print "It's OK!";
629EXPECT
630It's OK!
cb55de95 631########
632# Inaba Hiroto
633reset;
634if (0) {
635 if ("" =~ //) {
636 }
637}
638########
639# Nicholas Clark
640$ENV{TERM} = 0;
641reset;
642// if 0;
643########
644# Vadim Konovalov
645use strict;
646sub new_pmop($) {
647 my $pm = shift;
648 return eval "sub {shift=~/$pm/}";
649}
650new_pmop "abcdef"; reset;
651new_pmop "abcdef"; reset;
652new_pmop "abcdef"; reset;
653new_pmop "abcdef"; reset;
880649cd 654########
655# David Dyck
656# coredump in 5.7.1
657close STDERR; die;
658EXPECT
dba9804b 659########
99799961 660-w
661"x" =~ /(\G?x)?/; # core dump in 20000716.007
99799961 662########
dba9804b 663# Bug 20010515.004
664my @h = 1 .. 10;
665bad(@h);
666sub bad {
667 undef @h;
668 print "O";
669 print for @_;
670 print "K";
671}
672EXPECT
673OK
97b9a4cb 674########
675# Bug 20010506.041
676"abcd\x{1234}" =~ /(a)(b[c])(d+)?/i and print "ok\n";
677EXPECT
678ok
0b490c9c 679########
680# Bug 20010422.005
681{s//${}/; //}
682EXPECT
2172ddaf 683syntax error at - line 2, near "${}"
0b490c9c 684Execution of - aborted due to compilation errors.
585602fa 685########
686# Bug 20010528.007
687"\x{"
688EXPECT
689Missing right brace on \x{} at - line 2, within string
690Execution of - aborted due to compilation errors.
08b362fd 691########
692my $foo = Bar->new();
693my @dst;
694END {
695 ($_ = "@dst") =~ s/\(0x.+?\)/(0x...)/;
696 print $_, "\n";
697}
698package Bar;
699sub new {
700 my Bar $self = bless [], Bar;
701 eval '$self';
702 return $self;
703}
704sub DESTROY {
705 push @dst, "$_[0]";
706}
707EXPECT
708Bar=ARRAY(0x...)
1f96ff2a 709########
7c8c5f1c 710######## found by Markov chain stress testing
1f96ff2a 711eval "a.b.c.d.e.f;sub"
712EXPECT
c9beb3f5 713
714######## perlbug ID 20010831.001
715($a, b) = (1, 2);
716EXPECT
717Can't modify constant item in list assignment at - line 1, near ");"
718Execution of - aborted due to compilation errors.
f8d0fd74 719######## tying a bareword causes a segfault in 5.6.1
720tie FOO, "Foo";
721EXPECT
722Can't modify constant item in tie at - line 1, near ""Foo";"
723Execution of - aborted due to compilation errors.
abfc75a9 724######## undefing constant causes a segfault in 5.6.1 [ID 20010906.019]
725undef foo;
726EXPECT
727Can't modify constant item in undef operator at - line 1, near "foo;"
728Execution of - aborted due to compilation errors.
8bfdd7d9 729######## (?{...}) compilation bounces on PL_rs
730-0
731{
732 /(?{ $x })/;
733 # {
734}
735BEGIN { print "ok\n" }
736EXPECT
737ok
c74e71c7 738######## read($var, FILE, 1) segfaults on 5.6.1 [ID 20011025.054]
739read($bla, FILE, 1);
740EXPECT
741Can't modify constant item in read at - line 1, near "1)"
742Execution of - aborted due to compilation errors.
80071be7 743######## scalar ref to file test operator segfaults on 5.6.1 [ID 20011127.155]
744# This only happens if the filename is 11 characters or less.
745$foo = \-f "blah";
746print "ok" if ref $foo && !$$foo;
747EXPECT
748ok
15a59b2d 749######## [ID 20011128.159] 'X' =~ /\X/ segfault in 5.6.1
750print "ok" if 'X' =~ /\X/;
751EXPECT
752ok
f9dc862f 753######## segfault in 5.6.1 within peep()
754@a = (1..9);
755@b = sort { @c = sort { @d = sort { 0 } @a; @d; } @a; } @a;
756print join '', @a, "\n";
757EXPECT
758123456789
0e548461 759######## [ID 20010912.007] segfault or "Can't modify non-existent substring"
760$b="abcde";
761$s = \substr($b, 2, 1);
762print "before: $$s\n";
763{
764 local $k;
765 *k = $s;
766}
767print "after: $$s\n";
768EXPECT
769before: c
770after: c
a6fc0784 771######## [ID 20020104.007] "coredump on dbmclose"
772package Foo;
773eval { dbmclose %h }; # not all places have dbm* functions
774if ($@) {
775 print "ok\n";
776 exit 0;
777}
778package Foo;
779sub new {
780 my $proto = shift;
781 my $class = ref($proto) || $proto;
782 my $self = {};
783 bless($self,$class);
784 my %LT;
785 dbmopen(%LT, "dbmtest", 0666) ||
786 die "Can't open dbmtest because of $!\n";
787 $self->{'LT'} = \%LT;
788 return $self;
789}
790sub DESTROY {
791 my $self = shift;
792 dbmclose(%{$self->{'LT'}});
793 return 1;
794}
795package main;
796$test = Foo->new(); # must be package var
797END
798{
26d793c1 799 1 while unlink 'dbmtest';
a6fc0784 800 1 while unlink <dbmtest.*>;
801 print "ok\n";
802}
803EXPECT
804ok