This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
d70b767478099d2f9808f4f0d7f8dad002b97baf
[perl5.git] / t / comp / script.t
1 #!./perl
2
3 BEGIN {
4     chdir 't';
5     @INC = '../lib';
6     require './test.pl';
7 }
8
9 my $Perl = which_perl;
10
11 print "1..3\n";
12
13 $x = `$Perl -le "print 'ok';"`;
14
15 if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
16
17 open(try,">Comp.script") || (die "Can't open temp file.");
18 print try 'print "ok\n";'; print try "\n";
19 close try;
20
21 $x = `$Perl Comp.script`;
22
23 if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
24
25 $x = `$Perl <Comp.script`;
26
27 if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}
28
29 unlink 'Comp.script' || `/bin/rm -f Comp.script`;