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