"Fossies" - the Fresh Open Source Software Archive

Member "Module-Build-0.4224/t/new_from_context.t" (30 May 2017, 429 Bytes) of package /linux/privat/Module-Build-0.4224.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl -w
    2 
    3 use strict;
    4 use lib 't/lib';
    5 use MBTest tests => 2;
    6 
    7 blib_load('Module::Build');
    8 
    9 my $tmp = MBTest->tmpdir;
   10 
   11 use DistGen;
   12 my $dist = DistGen->new( dir => $tmp );
   13 
   14 my $libdir = 'badlib';
   15 $dist->add_file("$libdir/Build.PL", 'die');
   16 $dist->regen;
   17 
   18 $dist->chdir_in;
   19 
   20 
   21 unshift(@INC, $libdir);
   22 my $mb = eval { Module::Build->new_from_context};
   23 ok(! $@, 'dodged the bullet') or die;
   24 ok($mb);
   25 
   26 # vim:ts=2:sw=2:et:sta