This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.000
[perl5.git] / t / comp / script.t
CommitLineData
8d063cd8
LW
1#!./perl
2
79072805 3# $RCSfile: script.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:23 $
8d063cd8
LW
4
5print "1..3\n";
6
7$x = `./perl -e 'print "ok\n";'`;
a0d0e21e 8if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. -e "print ""ok\n""";`; }
8d063cd8
LW
9
10if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
11
12open(try,">Comp.script") || (die "Can't open temp file.");
13print try 'print "ok\n";'; print try "\n";
14close try;
15
16$x = `./perl Comp.script`;
a0d0e21e 17if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. Comp.script`; }
8d063cd8
LW
18
19if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
20
21$x = `./perl <Comp.script`;
a0d0e21e 22if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. <Comp.script`; }
8d063cd8
LW
23
24if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}
25
a0d0e21e 26unlink 'Comp.script' || `/bin/rm -f Comp.script`;