From 467298a34215401cdcbb1dded51bc2aba5f1f41c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 11 Jun 2015 22:32:06 +0000 Subject: Module-Build-0.4214 --- t/new_from_context.t | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 t/new_from_context.t (limited to 't/new_from_context.t') 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 -- cgit v1.2.1