Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bring back $*CWD, run chdir.t

  • Loading branch information...
commit 0dc7d63dc2d4e04b3c217410332433f08ce64b4e 1 parent b0fc7aa
Moritz Lenz moritz authored
Showing with 7 additions and 3 deletions.
  1. +2 −1  src/core/IO.pm
  2. +3 −0  src/core/terms.pm
  3. +2 −2 t/spectest.data
3  src/core/IO.pm
View
@@ -273,8 +273,9 @@ sub dir($path = '.', Mu :$test = none('.', '..')) {
proto sub chdir(|$) { * }
multi sub chdir($path as Str) {
try {
- pir::new__PS('OS').chdir($path)
+ pir::new__PS('OS').chdir(nqp::unbox_s($path))
}
+ $*CWD = nqp::p6box_s(pir::new__PS('OS').cwd);
$! ?? fail($!) !! True
}
3  src/core/terms.pm
View
@@ -24,6 +24,9 @@ sub term:<time>() { nqp::p6box_i(pir::time__I()) }
}
nqp::bindkey(pir::get_who__PP(PROCESS), '$VM', $VM);
+ my $CWD = nqp::p6box_s(pir::new__PS('OS').cwd);
+ nqp::bindkey(pir::get_who__PP(PROCESS), '$CWD', $CWD);
+
my @INC;
@INC.push('lib');
@INC.push(%ENV<PERL6LIB>.split($VM<config><osname> eq 'MSWin32' ?? ';' !! ':')) if %ENV<PERL6LIB>;
4 t/spectest.data
View
@@ -496,7 +496,7 @@ S32-array/shift.t
S32-array/splice.t
S32-array/unshift.t
S32-basics/warn.t
-# S32-container/zip.t # err: Undefined routine '&Seq' called
+S32-container/zip.t
S32-hash/exists.t
# S32-hash/delete.t # err: Too many positional parameters passed
S32-hash/invert.t
@@ -505,7 +505,7 @@ S32-hash/pairs.t
S32-hash/push.t
S32-hash/slice.t
S32-io/dir.t
-# S32-io/chdir.t # err: Dynamic variable $*CWD not found
+S32-io/chdir.t
S32-io/file-tests.t
S32-io/note.t
S32-io/IO-Socket-INET.t
Please sign in to comment.
Something went wrong with that request. Please try again.