summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spiers <stow@adamspiers.org>2019-06-28 00:53:12 +0100
committerAdam Spiers <stow@adamspiers.org>2019-06-28 00:53:12 +0100
commitba48fd39089010c6a0a40aecc6a9e8f0a2241e04 (patch)
tree72732eda3ec0dcf7d83b3194b79e2ad06b31d608
parent5f875009f80cfd309223378bfcdb1d4d85599079 (diff)
downloadstow-ba48fd39089010c6a0a40aecc6a9e8f0a2241e04.tar.gz
Rename $OUT_DIR to $TEST_DIR
This is a more accurate reflection of what it is.
-rwxr-xr-xt/chkstow.t2
-rwxr-xr-xt/cleanup_invalid_links.t2
-rwxr-xr-xt/cli_options.t14
-rwxr-xr-xt/defer.t2
-rwxr-xr-xt/dotfiles.t2
-rwxr-xr-xt/examples.t2
-rwxr-xr-xt/find_stowed_path.t26
-rwxr-xr-xt/foldable.t2
-rwxr-xr-xt/ignore.t2
-rwxr-xr-xt/rc_options.t28
-rwxr-xr-xt/stow.t32
-rwxr-xr-xt/testutil.pm8
-rwxr-xr-xt/unstow.t42
-rwxr-xr-xt/unstow_orig.t40
14 files changed, 102 insertions, 102 deletions
diff --git a/t/chkstow.t b/t/chkstow.t
index 439775f..36516a6 100755
--- a/t/chkstow.t
+++ b/t/chkstow.t
@@ -30,7 +30,7 @@ use Test::Output;
use English qw(-no_match_vars);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
# setup stow directory
make_dir('stow');
diff --git a/t/cleanup_invalid_links.t b/t/cleanup_invalid_links.t
index 916a6b9..3fd5e0d 100755
--- a/t/cleanup_invalid_links.t
+++ b/t/cleanup_invalid_links.t
@@ -28,7 +28,7 @@ use English qw(-no_match_vars);
use testutil;
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow;
diff --git a/t/cli_options.t b/t/cli_options.t
index 719c78c..c63e33e 100755
--- a/t/cli_options.t
+++ b/t/cli_options.t
@@ -32,15 +32,15 @@ init_test_dirs();
local @ARGV = (
'-v',
- '-d', "$OUT_DIR/stow",
- '-t', "$OUT_DIR/target",
+ '-d', "$TEST_DIR/stow",
+ '-t', "$TEST_DIR/target",
'dummy'
);
my ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
is($options->{verbose}, 1, 'verbose option');
-is($options->{dir}, "$OUT_DIR/stow", 'stow dir option');
+is($options->{dir}, "$TEST_DIR/stow", 'stow dir option');
my $stow = new_Stow(%$options);
@@ -101,12 +101,12 @@ is_deeply($options->{ignore}, [ qr(~\z), qr(\.#.*\z) ] => 'ignore temp files');
# Check that expansion not applied.
#
local @ARGV = (
- "--target=$OUT_DIR/".'$HOME',
+ "--target=$TEST_DIR/".'$HOME',
'dummy'
);
-make_dir("$OUT_DIR/".'$HOME');
+make_dir("$TEST_DIR/".'$HOME');
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
-is($options->{target}, "$OUT_DIR/".'$HOME', 'no expansion');
-remove_dir("$OUT_DIR/".'$HOME');
+is($options->{target}, "$TEST_DIR/".'$HOME', 'no expansion');
+remove_dir("$TEST_DIR/".'$HOME');
# vim:ft=perl
diff --git a/t/defer.t b/t/defer.t
index 003cf64..4434e0f 100755
--- a/t/defer.t
+++ b/t/defer.t
@@ -27,7 +27,7 @@ use testutil;
use Test::More tests => 4;
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow;
diff --git a/t/dotfiles.t b/t/dotfiles.t
index 386359e..db5a8bb 100755
--- a/t/dotfiles.t
+++ b/t/dotfiles.t
@@ -30,7 +30,7 @@ use English qw(-no_match_vars);
use testutil;
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow;
diff --git a/t/examples.t b/t/examples.t
index 56aa5b6..ead89c3 100755
--- a/t/examples.t
+++ b/t/examples.t
@@ -28,7 +28,7 @@ use Test::More tests => 10;
use English qw(-no_match_vars);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow;
diff --git a/t/find_stowed_path.t b/t/find_stowed_path.t
index 44aabe0..b4bd28a 100755
--- a/t/find_stowed_path.t
+++ b/t/find_stowed_path.t
@@ -28,15 +28,15 @@ use Test::More tests => 6;
init_test_dirs();
-my $stow = new_Stow(dir => "$OUT_DIR/stow");
+my $stow = new_Stow(dir => "$TEST_DIR/stow");
is_deeply(
- [ $stow->find_stowed_path("$OUT_DIR/target/a/b/c", '../../../stow/a/b/c') ],
- [ "$OUT_DIR/stow/a/b/c", "$OUT_DIR/stow", 'a' ]
+ [ $stow->find_stowed_path("$TEST_DIR/target/a/b/c", '../../../stow/a/b/c') ],
+ [ "$TEST_DIR/stow/a/b/c", "$TEST_DIR/stow", 'a' ]
=> 'from root'
);
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
$stow->set_stow_dir('../stow');
is_deeply(
[ $stow->find_stowed_path('a/b/c','../../../stow/a/b/c') ],
@@ -46,33 +46,33 @@ is_deeply(
make_dir('stow');
cd('../..');
-$stow->set_stow_dir("$OUT_DIR/target/stow");
+$stow->set_stow_dir("$TEST_DIR/target/stow");
is_deeply(
- [ $stow->find_stowed_path("$OUT_DIR/target/a/b/c", '../../stow/a/b/c') ],
- [ "$OUT_DIR/target/stow/a/b/c", "$OUT_DIR/target/stow", 'a' ]
+ [ $stow->find_stowed_path("$TEST_DIR/target/a/b/c", '../../stow/a/b/c') ],
+ [ "$TEST_DIR/target/stow/a/b/c", "$TEST_DIR/target/stow", 'a' ]
=> 'stow is subdir of target directory'
);
is_deeply(
- [ $stow->find_stowed_path("$OUT_DIR/target/a/b/c",'../../empty') ],
+ [ $stow->find_stowed_path("$TEST_DIR/target/a/b/c",'../../empty') ],
[ '', '', '' ]
=> 'target is not stowed'
);
-make_dir("$OUT_DIR/target/stow2");
-make_file("$OUT_DIR/target/stow2/.stow");
+make_dir("$TEST_DIR/target/stow2");
+make_file("$TEST_DIR/target/stow2/.stow");
is_deeply(
- [ $stow->find_stowed_path("$OUT_DIR/target/a/b/c",'../../stow2/a/b/c') ],
- [ "$OUT_DIR/target/stow2/a/b/c", "$OUT_DIR/target/stow2", 'a' ]
+ [ $stow->find_stowed_path("$TEST_DIR/target/a/b/c",'../../stow2/a/b/c') ],
+ [ "$TEST_DIR/target/stow2/a/b/c", "$TEST_DIR/target/stow2", 'a' ]
=> q(detect alternate stow directory)
);
# Possible corner case with rogue symlink pointing to ancestor of
# stow dir.
is_deeply(
- [ $stow->find_stowed_path("$OUT_DIR/target/a/b/c",'../../..') ],
+ [ $stow->find_stowed_path("$TEST_DIR/target/a/b/c",'../../..') ],
[ '', '', '' ]
=> q(corner case - link points to ancestor of stow dir)
);
diff --git a/t/foldable.t b/t/foldable.t
index 8f4f417..78096d7 100755
--- a/t/foldable.t
+++ b/t/foldable.t
@@ -28,7 +28,7 @@ use Test::More tests => 4;
use English qw(-no_match_vars);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow = new_Stow(dir => '../stow');
diff --git a/t/ignore.t b/t/ignore.t
index d0b5444..840c6e7 100755
--- a/t/ignore.t
+++ b/t/ignore.t
@@ -29,7 +29,7 @@ use testutil;
use Stow::Util qw(join_paths);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow = new_Stow();
diff --git a/t/rc_options.t b/t/rc_options.t
index dee156a..419f8c3 100755
--- a/t/rc_options.t
+++ b/t/rc_options.t
@@ -29,7 +29,7 @@ use testutil;
require 'stow';
# stowrc file used for testing.
-my $RC_FILE = "$OUT_DIR/.stowrc";
+my $RC_FILE = "$TEST_DIR/.stowrc";
# Take the safe route and cowardly refuse to continue if there's
# already a file at $RC_FILE.
if (-e $RC_FILE) {
@@ -52,24 +52,24 @@ init_test_dirs();
#
local @ARGV = ('dummy');
$rc_contents = <<HERE;
- -d $OUT_DIR/stow
- --target $OUT_DIR/target
+ -d $TEST_DIR/stow
+ --target $TEST_DIR/target
HERE
make_file($RC_FILE, $rc_contents);
my ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
-is($options->{target}, "$OUT_DIR/target", "rc options different lines");
-is($options->{dir}, "$OUT_DIR/stow", "rc options different lines");
+is($options->{target}, "$TEST_DIR/target", "rc options different lines");
+is($options->{dir}, "$TEST_DIR/stow", "rc options different lines");
#
# Test that scalar cli option overwrites conflicting stowrc option.
#
-local @ARGV = ('-d', "$OUT_DIR/stow",'dummy');
+local @ARGV = ('-d', "$TEST_DIR/stow",'dummy');
$rc_contents = <<HERE;
-d bad/path
HERE
make_file($RC_FILE, $rc_contents);
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
-is($options->{dir}, "$OUT_DIR/stow", "cli overwrite scalar rc option.");
+is($options->{dir}, "$TEST_DIR/stow", "cli overwrite scalar rc option.");
#
# Test that list cli option merges with conflicting stowrc option.
@@ -98,8 +98,8 @@ is_deeply($options->{defer}, [qr(\Ainfo), qr(\Aman)],
# Test environment variable expansion function.
#
# Basic expansion
-is(expand_environment('$HOME/stow'), "$OUT_DIR/stow", 'expand $HOME');
-is(expand_environment('${HOME}/stow'), "$OUT_DIR/stow", 'expand ${HOME}');
+is(expand_environment('$HOME/stow'), "$TEST_DIR/stow", 'expand $HOME');
+is(expand_environment('${HOME}/stow'), "$TEST_DIR/stow", 'expand ${HOME}');
delete $ENV{UNDEFINED}; # just in case
foreach my $var ('$UNDEFINED', '${UNDEFINED}') {
@@ -144,9 +144,9 @@ $rc_contents = <<'HERE';
HERE
make_file($RC_FILE, $rc_contents);
($options, $pkgs_to_delete, $pkgs_to_stow) = get_config_file_options();
-is($options->{dir}, "$OUT_DIR/stow",
+is($options->{dir}, "$TEST_DIR/stow",
"apply environment expansion on stowrc --dir");
-is($options->{target}, "$OUT_DIR/stow",
+is($options->{target}, "$TEST_DIR/stow",
"apply environment expansion on stowrc --target");
is_deeply($options->{ignore}, [qr(\$HOME\z)],
"environment expansion not applied on --ignore");
@@ -167,9 +167,9 @@ $rc_contents = <<'HERE';
HERE
make_file($RC_FILE, $rc_contents);
($options, $pkgs_to_delete, $pkgs_to_stow) = get_config_file_options();
-is($options->{dir}, "$OUT_DIR/stow",
+is($options->{dir}, "$TEST_DIR/stow",
"apply environment expansion on stowrc --dir");
-is($options->{target}, "$OUT_DIR/stow",
+is($options->{target}, "$TEST_DIR/stow",
"apply environment expansion on stowrc --target");
is_deeply($options->{ignore}, [qr(~/stow\z)],
"environment expansion not applied on --ignore");
@@ -181,5 +181,5 @@ is_deeply($options->{override}, [qr(\A~/stow)],
# Clean up files used for testing.
#
unlink $RC_FILE or die "Unable to clean up $RC_FILE.\n";
-remove_dir($OUT_DIR);
+remove_dir($TEST_DIR);
diff --git a/t/stow.t b/t/stow.t
index e86b79a..8960916 100755
--- a/t/stow.t
+++ b/t/stow.t
@@ -30,7 +30,7 @@ use Stow::Util qw(canon_path);
use testutil;
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
my $stow;
my %conflicts;
@@ -400,16 +400,16 @@ uncapture_stderr();
# stow a simple tree minimally when cwd isn't target
#
cd('../..');
-$stow = new_Stow(dir => "$OUT_DIR/stow", target => "$OUT_DIR/target");
+$stow = new_Stow(dir => "$TEST_DIR/stow", target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg16/bin16");
-make_file("$OUT_DIR/stow/pkg16/bin16/file16");
+make_dir("$TEST_DIR/stow/pkg16/bin16");
+make_file("$TEST_DIR/stow/pkg16/bin16/file16");
$stow->plan_stow('pkg16');
$stow->process_tasks();
is_deeply([ $stow->get_conflicts ], [], 'no conflicts with minimal stow');
is(
- readlink("$OUT_DIR/target/bin16"),
+ readlink("$TEST_DIR/target/bin16"),
'../stow/pkg16/bin16',
=> "minimal stow of a simple tree when cwd isn't target"
);
@@ -418,17 +418,17 @@ is(
# stow a simple tree minimally to absolute stow dir when cwd isn't
# target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => "$OUT_DIR/target");
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg17/bin17");
-make_file("$OUT_DIR/stow/pkg17/bin17/file17");
+make_dir("$TEST_DIR/stow/pkg17/bin17");
+make_file("$TEST_DIR/stow/pkg17/bin17/file17");
$stow->plan_stow('pkg17');
$stow->process_tasks();
is_deeply([ $stow->get_conflicts ], [], 'no conflicts with minimal stow');
is(
- readlink("$OUT_DIR/target/bin17"),
+ readlink("$TEST_DIR/target/bin17"),
'../stow/pkg17/bin17',
=> "minimal stow of a simple tree with absolute stow dir"
);
@@ -437,17 +437,17 @@ is(
# stow a simple tree minimally with absolute stow AND target dirs when
# cwd isn't target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => canon_path("$OUT_DIR/target"));
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => canon_path("$TEST_DIR/target"));
-make_dir("$OUT_DIR/stow/pkg18/bin18");
-make_file("$OUT_DIR/stow/pkg18/bin18/file18");
+make_dir("$TEST_DIR/stow/pkg18/bin18");
+make_file("$TEST_DIR/stow/pkg18/bin18/file18");
$stow->plan_stow('pkg18');
$stow->process_tasks();
is_deeply([ $stow->get_conflicts ], [], 'no conflicts with minimal stow');
is(
- readlink("$OUT_DIR/target/bin18"),
+ readlink("$TEST_DIR/target/bin18"),
'../stow/pkg18/bin18',
=> "minimal stow of a simple tree with absolute stow and target dirs"
);
@@ -458,7 +458,7 @@ is(
# folded directories should be split open (unfolded) where
# (and only where) necessary
#
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
sub create_pkg {
my ($id, $pkg) = @_;
diff --git a/t/testutil.pm b/t/testutil.pm
index 139369b..a3eb69a 100755
--- a/t/testutil.pm
+++ b/t/testutil.pm
@@ -36,7 +36,7 @@ use Stow::Util qw(parent canon_path);
use base qw(Exporter);
our @EXPORT = qw(
- $OUT_DIR
+ $TEST_DIR
$stderr
init_test_dirs
cd
@@ -48,7 +48,7 @@ our @EXPORT = qw(
capture_stderr uncapture_stderr
);
-our $OUT_DIR = 'tmp-testing-trees';
+our $TEST_DIR = 'tmp-testing-trees';
our $stderr;
my $tied_err;
@@ -64,13 +64,13 @@ sub uncapture_stderr {
}
sub init_test_dirs {
- for my $dir ("$OUT_DIR/target", "$OUT_DIR/stow") {
+ for my $dir ("$TEST_DIR/target", "$TEST_DIR/stow") {
-d $dir and remove_tree($dir);
make_dir($dir);
}
# Don't let user's ~/.stow-global-ignore affect test results
- $ENV{HOME} = $OUT_DIR;
+ $ENV{HOME} = $TEST_DIR;
}
sub new_Stow {
diff --git a/t/unstow.t b/t/unstow.t
index 34b463d..b25e8ad 100755
--- a/t/unstow.t
+++ b/t/unstow.t
@@ -30,7 +30,7 @@ use testutil;
use Stow::Util qw(canon_path);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
# Note that each of the following tests use a distinct set of files
@@ -279,8 +279,8 @@ ok(
# Unstow a never stowed package
#
-eval { remove_dir("$OUT_DIR/target"); };
-mkdir("$OUT_DIR/target");
+eval { remove_dir("$TEST_DIR/target"); };
+mkdir("$TEST_DIR/target");
$stow = new_Stow();
$stow->plan_unstow('pkg12');
@@ -310,17 +310,17 @@ ok(
# unstow a simple tree minimally when cwd isn't target
#
cd('../..');
-$stow = new_Stow(dir => "$OUT_DIR/stow", target => "$OUT_DIR/target");
+$stow = new_Stow(dir => "$TEST_DIR/stow", target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg13/bin13");
-make_file("$OUT_DIR/stow/pkg13/bin13/file13");
-make_link("$OUT_DIR/target/bin13", '../stow/pkg13/bin13');
+make_dir("$TEST_DIR/stow/pkg13/bin13");
+make_file("$TEST_DIR/stow/pkg13/bin13/file13");
+make_link("$TEST_DIR/target/bin13", '../stow/pkg13/bin13');
$stow->plan_unstow('pkg13');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg13/bin13/file13" && ! -e "$OUT_DIR/target/bin13"
+ -f "$TEST_DIR/stow/pkg13/bin13/file13" && ! -e "$TEST_DIR/target/bin13"
=> 'unstow a simple tree'
);
@@ -328,18 +328,18 @@ ok(
# unstow a simple tree minimally with absolute stow dir when cwd isn't
# target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => "$OUT_DIR/target");
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg14/bin14");
-make_file("$OUT_DIR/stow/pkg14/bin14/file14");
-make_link("$OUT_DIR/target/bin14", '../stow/pkg14/bin14');
+make_dir("$TEST_DIR/stow/pkg14/bin14");
+make_file("$TEST_DIR/stow/pkg14/bin14/file14");
+make_link("$TEST_DIR/target/bin14", '../stow/pkg14/bin14');
$stow->plan_unstow('pkg14');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg14/bin14/file14" && ! -e "$OUT_DIR/target/bin14"
+ -f "$TEST_DIR/stow/pkg14/bin14/file14" && ! -e "$TEST_DIR/target/bin14"
=> 'unstow a simple tree with absolute stow dir'
);
@@ -347,18 +347,18 @@ ok(
# unstow a simple tree minimally with absolute stow AND target dirs
# when cwd isn't target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => canon_path("$OUT_DIR/target"));
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => canon_path("$TEST_DIR/target"));
-make_dir("$OUT_DIR/stow/pkg15/bin15");
-make_file("$OUT_DIR/stow/pkg15/bin15/file15");
-make_link("$OUT_DIR/target/bin15", '../stow/pkg15/bin15');
+make_dir("$TEST_DIR/stow/pkg15/bin15");
+make_file("$TEST_DIR/stow/pkg15/bin15/file15");
+make_link("$TEST_DIR/target/bin15", '../stow/pkg15/bin15');
$stow->plan_unstow('pkg15');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg15/bin15/file15" && ! -e "$OUT_DIR/target/bin15"
+ -f "$TEST_DIR/stow/pkg15/bin15/file15" && ! -e "$TEST_DIR/target/bin15"
=> 'unstow a simple tree with absolute stow and target dirs'
);
@@ -366,7 +366,7 @@ ok(
# unstow a tree with no-folding enabled -
# no refolding should take place
#
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
sub create_and_stow_pkg {
my ($id, $pkg) = @_;
diff --git a/t/unstow_orig.t b/t/unstow_orig.t
index a4e3142..4b62068 100755
--- a/t/unstow_orig.t
+++ b/t/unstow_orig.t
@@ -30,7 +30,7 @@ use testutil;
use Stow::Util qw(canon_path);
init_test_dirs();
-cd("$OUT_DIR/target");
+cd("$TEST_DIR/target");
# Note that each of the following tests use a distinct set of files
@@ -308,8 +308,8 @@ check_protected_dirs_skipped();
# Unstow a never stowed package
#
-eval { remove_dir("$OUT_DIR/target"); };
-mkdir("$OUT_DIR/target");
+eval { remove_dir("$TEST_DIR/target"); };
+mkdir("$TEST_DIR/target");
$stow = new_compat_Stow();
capture_stderr();
@@ -343,17 +343,17 @@ check_protected_dirs_skipped();
# unstow a simple tree minimally when cwd isn't target
#
cd('../..');
-$stow = new_Stow(dir => "$OUT_DIR/stow", target => "$OUT_DIR/target");
+$stow = new_Stow(dir => "$TEST_DIR/stow", target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg13/bin13");
-make_file("$OUT_DIR/stow/pkg13/bin13/file13");
-make_link("$OUT_DIR/target/bin13", '../stow/pkg13/bin13');
+make_dir("$TEST_DIR/stow/pkg13/bin13");
+make_file("$TEST_DIR/stow/pkg13/bin13/file13");
+make_link("$TEST_DIR/target/bin13", '../stow/pkg13/bin13');
$stow->plan_unstow('pkg13');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg13/bin13/file13" && ! -e "$OUT_DIR/target/bin13"
+ -f "$TEST_DIR/stow/pkg13/bin13/file13" && ! -e "$TEST_DIR/target/bin13"
=> 'unstow a simple tree'
);
@@ -361,18 +361,18 @@ ok(
# unstow a simple tree minimally with absolute stow dir when cwd isn't
# target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => "$OUT_DIR/target");
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => "$TEST_DIR/target");
-make_dir("$OUT_DIR/stow/pkg14/bin14");
-make_file("$OUT_DIR/stow/pkg14/bin14/file14");
-make_link("$OUT_DIR/target/bin14", '../stow/pkg14/bin14');
+make_dir("$TEST_DIR/stow/pkg14/bin14");
+make_file("$TEST_DIR/stow/pkg14/bin14/file14");
+make_link("$TEST_DIR/target/bin14", '../stow/pkg14/bin14');
$stow->plan_unstow('pkg14');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg14/bin14/file14" && ! -e "$OUT_DIR/target/bin14"
+ -f "$TEST_DIR/stow/pkg14/bin14/file14" && ! -e "$TEST_DIR/target/bin14"
=> 'unstow a simple tree with absolute stow dir'
);
@@ -380,18 +380,18 @@ ok(
# unstow a simple tree minimally with absolute stow AND target dirs
# when cwd isn't target
#
-$stow = new_Stow(dir => canon_path("$OUT_DIR/stow"),
- target => canon_path("$OUT_DIR/target"));
+$stow = new_Stow(dir => canon_path("$TEST_DIR/stow"),
+ target => canon_path("$TEST_DIR/target"));
-make_dir("$OUT_DIR/stow/pkg15/bin15");
-make_file("$OUT_DIR/stow/pkg15/bin15/file15");
-make_link("$OUT_DIR/target/bin15", '../stow/pkg15/bin15');
+make_dir("$TEST_DIR/stow/pkg15/bin15");
+make_file("$TEST_DIR/stow/pkg15/bin15/file15");
+make_link("$TEST_DIR/target/bin15", '../stow/pkg15/bin15');
$stow->plan_unstow('pkg15');
$stow->process_tasks();
ok(
$stow->get_conflict_count == 0 &&
- -f "$OUT_DIR/stow/pkg15/bin15/file15" && ! -e "$OUT_DIR/target/bin15"
+ -f "$TEST_DIR/stow/pkg15/bin15/file15" && ! -e "$TEST_DIR/target/bin15"
=> 'unstow a simple tree with absolute stow and target dirs'
);