summaryrefslogtreecommitdiff
path: root/t/new_from_context.t
diff options
context:
space:
mode:
Diffstat (limited to 't/new_from_context.t')
-rw-r--r--t/new_from_context.t26
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