diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-06-11 22:32:06 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-06-11 22:32:06 +0000 |
commit | 467298a34215401cdcbb1dded51bc2aba5f1f41c (patch) | |
tree | 1923f32fbc9cf8f0b4ab291d1eb9fad5ab872d68 /t/new_from_context.t | |
download | Module-Build-tarball-467298a34215401cdcbb1dded51bc2aba5f1f41c.tar.gz |
Module-Build-0.4214HEADModule-Build-0.4214master
Diffstat (limited to 't/new_from_context.t')
-rw-r--r-- | t/new_from_context.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/new_from_context.t b/t/new_from_context.t new file mode 100644 index 0000000..a9ec00b --- /dev/null +++ b/t/new_from_context.t @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w + +use strict; +use lib 't/lib'; +use MBTest tests => 2; + +blib_load('Module::Build'); + +my $tmp = MBTest->tmpdir; + +use DistGen; +my $dist = DistGen->new( dir => $tmp ); + +my $libdir = 'badlib'; +$dist->add_file("$libdir/Build.PL", 'die'); +$dist->regen; + +$dist->chdir_in; + + +unshift(@INC, $libdir); +my $mb = eval { Module::Build->new_from_context}; +ok(! $@, 'dodged the bullet') or die; +ok($mb); + +# vim:ts=2:sw=2:et:sta |