7 use_ok 'Module::Build';
8 ensure_blib('Module::Build');
11 my $tmp = MBTest->tmpdir;
14 my $dist = DistGen->new( dir => $tmp );
19 my $mb = Module::Build->new_from_context;
22 # Make sure copy_if_modified() can handle spaces in filenames
25 push @tmp, MBTest->tmpdir for (0 .. 1);
27 my $filename = 'file with spaces.txt';
29 my $file = File::Spec->catfile($tmp[0], $filename);
30 my $fh = IO::File->new($file, '>') or die "Can't create $file: $!";
36 my $file2 = $mb->copy_if_modified(from => $file, to_dir => $tmp[1]);
42 # Try some dir_contains() combinations
43 my $first = File::Spec->catdir('', 'one', 'two');
44 my $second = File::Spec->catdir('', 'one', 'two', 'three');
46 ok( Module::Build->dir_contains($first, $second) );