stow/t/defer.t
Adam Spiers 10ea9c6f4b Numerous fixes so that `make distcheck' succeeds.
Moves temporary test trees into a separate directory.
2011-11-26 16:34:57 +00:00

29 lines
584 B
Perl
Executable file

#!/usr/local/bin/perl
#
# Testing defer().
#
use strict;
use warnings;
use testutil;
use Test::More tests => 4;
init_test_dirs();
cd("$OUT_DIR/target");
my $stow;
$stow = new_Stow(defer => [ 'man' ]);
ok($stow->defer('man/man1/file.1') => 'simple success');
$stow = new_Stow(defer => [ 'lib' ]);
ok(! $stow->defer('man/man1/file.1') => 'simple failure');
$stow = new_Stow(defer => [ 'lib', 'man', 'share' ]);
ok($stow->defer('man/man1/file.1') => 'complex success');
$stow = new_Stow(defer => [ 'lib', 'man', 'share' ]);
ok(! $stow->defer('bin/file') => 'complex failure');