Skip to content

Commit

Permalink
Test switching working directory of execution
Browse files Browse the repository at this point in the history
  • Loading branch information
ferki committed Apr 17, 2023
1 parent 3a57c93 commit 57e0fbd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/issue/1583.t
@@ -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' );

0 comments on commit 57e0fbd

Please sign in to comment.