2011-11-16 09:04:03 -05:00
|
|
|
#!/usr/local/bin/perl
|
|
|
|
|
|
|
|
#
|
|
|
|
# Testing defer().
|
|
|
|
#
|
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use testutil;
|
2011-11-16 09:04:03 -05:00
|
|
|
|
|
|
|
use Test::More tests => 4;
|
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
my $stow;
|
|
|
|
|
|
|
|
$stow = new_Stow(defer => [ 'man' ]);
|
|
|
|
ok($stow->defer('man/man1/file.1') => 'simple success');
|
2011-11-16 09:04:03 -05:00
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
$stow = new_Stow(defer => [ 'lib' ]);
|
|
|
|
ok(! $stow->defer('man/man1/file.1') => 'simple failure');
|
2011-11-16 09:04:03 -05:00
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
$stow = new_Stow(defer => [ 'lib', 'man', 'share' ]);
|
|
|
|
ok($stow->defer('man/man1/file.1') => 'complex success');
|
2011-11-16 09:04:03 -05:00
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
$stow = new_Stow(defer => [ 'lib', 'man', 'share' ]);
|
|
|
|
ok(! $stow->defer('bin/file') => 'complex failure');
|