Skip to content

Commit

Permalink
Put two variables into lexical, that is file, scope.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@12079 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bschmalhofer committed Mar 30, 2006
1 parent 60fa3fd commit 7189977
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions t/pmc/os.t
Expand Up @@ -11,17 +11,16 @@ use Parrot::Config;
use Cwd;
use File::Spec;

our ($MSWin32, $cygwin);
$MSWin32 = 1 if $^O =~ m!MSWin32!;
$cygwin = 1 if $^O =~ m!cygwin!;
my $MSWin32 = $^O =~ m!MSWin32!;
my $cygwin = $^O =~ m!cygwin!;

=head1 NAME
t/pmc/os.t - Files and Dirs
=head1 SYNOPSIS
% prove t/pmc/os.t
% prove t/pmc/os.t
=head1 DESCRIPTION
Expand All @@ -37,7 +36,7 @@ END {

# test 'cwd'
my $cwd = File::Spec->canonpath(getcwd);
pir_output_is(<<'CODE', <<"OUT", "Test cwd");
pir_output_is(<<'CODE', <<"OUT", 'Test cwd');
.sub main :main
$P1 = new .OS
$S1 = $P1."cwd"()
Expand All @@ -53,9 +52,9 @@ OUT
# TEST chdir
chdir "src";
my $upcwd = File::Spec->canonpath(getcwd);
chdir "..";
chdir '..';

pir_output_is(<<'CODE', <<"OUT", "Test chdir");
pir_output_is(<<'CODE', <<"OUT", 'Test chdir');
.sub main :main
$P1 = new .OS
Expand Down Expand Up @@ -87,7 +86,7 @@ my $xpto = $upcwd;
$xpto =~ s/src([\/\\]?)$/xpto$1/;


pir_output_is(<<'CODE', <<"OUT", "Test mkdir");
pir_output_is(<<'CODE', <<"OUT", 'Test mkdir');
.sub main :main
$P1 = new .OS
Expand Down Expand Up @@ -117,7 +116,7 @@ OUT
# Test remove on a directory
mkdir "xpto" unless -d "xpto";

pir_output_is(<<'CODE', <<"OUT", "Test rm call in a directory");
pir_output_is(<<'CODE', <<'OUT', 'Test rm call in a directory');
.sub main :main
$P1 = new .OS
Expand Down Expand Up @@ -148,7 +147,7 @@ if ($cygwin || $MSWin32) {
# Skip inode number
my @s = stat('xpto');
$stat = join("\n",$s[0],@s[2..10])."\n";
pir_output_is(<<'CODE', $stat, "Test OS.stat");
pir_output_is(<<'CODE', $stat, 'Test OS.stat');
.sub main :main
$P1 = new .OS
$S1 = "xpto"
Expand All @@ -173,7 +172,7 @@ done:
CODE
} else {
$stat = join("\n",stat("xpto"))."\n";
pir_output_is(<<'CODE', $stat, "Test OS.stat");
pir_output_is(<<'CODE', $stat, 'Test OS.stat');
.sub main :main
$P1 = new .OS
$S1 = "xpto"
Expand All @@ -200,7 +199,7 @@ CODE
my $lstat;

SKIP: {
skip "lstat not available on Win 32 yet", 1 if $MSWin32;
skip 'lstat not available on Win 32 yet', 1 if $MSWin32;

if ($cygwin) {
# Skip inode number
Expand Down

0 comments on commit 7189977

Please sign in to comment.