Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1584 from RexOps/i_run_cwd
Fix switching working directory to another drive
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env perl | ||
|
||
use v5.12.5; | ||
use warnings; | ||
|
||
our $VERSION = '9999.99.99_99'; # VERSION | ||
|
||
use Test::More tests => 1; | ||
|
||
use English qw(-no_match_vars); | ||
use File::Spec; | ||
use Rex::Helper::Run; | ||
|
||
my $cmd = $OSNAME eq 'MSWin32' ? 'cd' : 'pwd'; | ||
|
||
my $target_dir = File::Spec->tmpdir(); | ||
my $dir = i_run $cmd, cwd => $target_dir; | ||
|
||
is( $dir, $target_dir, 'switch to temp directory' ); |