Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / perl5 / t / comp / script.t
1 #!./perl
2
3 # $RCSfile: script.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:23 $
4
5 print "1..3\n";
6
7 $PERL = ($^O eq 'MSWin32') ? '.\perl' : './perl';
8 $x = `$PERL -le "print 'ok';"`;
9 if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. -e "print ""ok\n""";`; }
10
11 if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
12
13 open(try,">Comp.script") || (die "Can't open temp file.");
14 print try 'print "ok\n";'; print try "\n";
15 close try;
16
17 $x = `$PERL Comp.script`;
18 if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. Comp.script`; }
19
20 if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
21
22 $x = `$PERL <Comp.script`;
23 if ($x =~ /DCL-W-NOCOMD/) { $x = `\$ mcr sys\$disk:[]perl. <Comp.script`; }
24
25 if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}
26
27 unlink 'Comp.script' || `/bin/rm -f Comp.script`;