4 # Testing core application
8 BEGIN { use lib
qw(.); require "t/util.pm"; require "stow"; }
10 use Test
::More tests
=> 10;
20 eval { remove_dir
('t/target'); };
21 eval { remove_dir
('t/stow'); };
25 ok
eval {process_options
(); 1} => 'process options';
26 ok
eval {set_stow_path
(); 1} => 'set stow path';
28 is
($Stow_Path,"../stow" => 'stow dir');
29 is_deeply
(\
@Pkgs_To_Stow, [ 'dummy' ] => 'default to stow');
33 # Check mixed up package options
49 is_deeply
(\
@Pkgs_To_Delete, [ 'd1', 'd2', 'r1', 'd3', 'r2' ] => 'mixed deletes');
50 is_deeply
(\
@Pkgs_To_Stow, [ 's1', 'r1', 's2', 's3', 'r2' ] => 'mixed stows');
53 # Check setting defered paths
61 is_deeply
($Option{'defer'}, [ qr
(\Aman
), qr
(\Ainfo
) ] => 'defer man and info');
64 # Check setting override paths
72 is_deeply
($Option{'override'}, [qr
(\Aman
), qr
(\Ainfo
)] => 'override man and info');
75 # Check stripping any matched quotes
83 is_deeply
($Option{'override'}, [qr
(\Aman
), qr
(\Ainfo
)] => 'strip shell quoting');
86 # Check setting ignored paths
94 is_deeply
($Option{'ignore'}, [ qr
(~\z
), qr
(\
.#.*\z) ] => 'ignore temp files');