4 # Testing find_stowed_path()
7 BEGIN { require "t/util.pm"; require "stow"; }
9 use Test
::More tests
=> 5;
11 eval { remove_dir
('t/target'); };
12 eval { remove_dir
('t/stow'); };
16 $Stow_Path = 't/stow';
18 find_stowed_path
('t/target/a/b/c', '../../../stow/a/b/c'),
23 $Stow_Path = '../stow';
25 find_stowed_path
('a/b/c','../../../stow/a/b/c'),
27 => 'from target directory'
30 $Stow_Path = 't/target/stow';
33 find_stowed_path
('t/target/a/b/c', '../../stow/a/b/c'),
34 't/target/stow/a/b/c',
35 => 'stow is subdir of target directory'
39 find_stowed_path
('t/target/a/b/c','../../empty'),
41 => 'target is not stowed'
44 make_dir
('t/target/stow2');
45 make_file
('t/target/stow2/.stow');
48 find_stowed_path
('t/target/a/b/c','../../stow2/a/b/c'),
49 't/target/stow2/a/b/c'
50 => q
(detect alternate stow directory
)