4 # Testing core application
10 use Test
::More tests
=> 9;
25 my ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options
();
27 is
($options->{verbose
}, 1, 'verbose option');
28 is
($options->{dir
}, "$OUT_DIR/stow", 'stow dir option');
30 my $stow = new_Stow
(%$options);
32 is
($stow->{stow_path
}, "../stow" => 'stow dir');
33 is_deeply
($pkgs_to_stow, [ 'dummy' ] => 'default to stow');
36 # Check mixed up package options
48 ($options, $pkgs_to_delete, $pkgs_to_stow) = process_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 deferred paths
60 ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options
();
61 is_deeply
($options->{defer
}, [ qr
(\Aman
), qr
(\Ainfo
) ] => 'defer man and info');
64 # Check setting override paths
71 ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options
();
72 is_deeply
($options->{override
}, [qr
(\Aman
), qr
(\Ainfo
)] => 'override man and info');
75 # Check setting ignored paths
82 ($options, $pkgs_to_delete, $pkgs_to_stow) = process_options
();
83 is_deeply
($options->{ignore
}, [ qr
(~\z
), qr
(\
.#.*\z) ] => 'ignore temp files');