Fix chkstow.t
[gnu-stow.git] / t / defer.t
bloba4f8cf763865f8e330fac62d9b751430c445b206
1 #!/usr/local/bin/perl
4 # Testing defer().
7 # load as a library
8 BEGIN { use lib qw(. ..); require "stow"; }
10 use Test::More tests => 4;
12 $Option{'defer'} = [ 'man' ];
13 ok(defer('man/man1/file.1') => 'simple success');
15 $Option{'defer'} = [ 'lib' ];
16 ok(!defer('man/man1/file.1') => 'simple failure');
18 $Option{'defer'} = [ 'lib', 'man', 'share' ];
19 ok(defer('man/man1/file.1') => 'complex success');
21 $Option{'defer'} = [ 'lib', 'man', 'share' ];
22 ok(!defer('bin/file') => 'complex failure');