use strict;
use warnings;
+use Path::Tiny qw/ path tempdir tempfile cwd /;
use File::Path qw/mkpath rmtree/;
-use Cwd qw/getcwd/;
my $IS_WIN = ( $^O eq "MSWin32" );
my $SEP = $IS_WIN ? "\\" : '/';
sub install
{
my ($basepath) = @_;
- my $cwd = getcwd();
- my $build_dir = "$cwd/$basepath-build-dir";
- my $inst_dir = "$cwd/$basepath-INST_DIR";
+ my $cwd = cwd->absolute;
+ my $build_dir = $cwd->child("$basepath-build-dir");
+ my $inst_dir = $cwd->child("$basepath-INST_DIR");
rmtree( $build_dir, 0, 0 );
rmtree( $inst_dir, 0, 0 );
mkpath($build_dir);
use strict;
use warnings;
+use Path::Tiny qw/ path tempdir tempfile cwd /;
+
use FindBin;
use lib "$FindBin::Bin/lib";
use FortTestInst ();
{
my $inst_dir = FortTestInst::install("fortune-o-rot");
local $ENV{FORTUNE_MOD_RAND_HARD_CODED_VALS} = 240;
- my $text = `$inst_dir/games/fortune -o`;
+ my $inst_bin = $inst_dir->child( "games", "fortune" );
+ my $text = `$inst_bin -o`;
# TEST
like( $text, qr/\A"Prayer/, 'fortune -o was not rotated' );