"Fossies" - the Fresh Open Source Software Archive

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


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # sample.t -- a sample test file for Module::Build
    2 
    3 use strict;
    4 use lib 't/lib';
    5 use MBTest tests => 2; # or 'no_plan'
    6 use DistGen;
    7 
    8 # Ensure any Module::Build modules are loaded from correct directory
    9 blib_load('Module::Build');
   10 
   11 # create dist object in a temp directory
   12 # enter the directory and generate the skeleton files
   13 my $dist = DistGen->new->chdir_in->regen;
   14 
   15 # get a Module::Build object and test with it
   16 my $mb = $dist->new_from_context(); # quiet by default
   17 isa_ok( $mb, "Module::Build" );
   18 is( $mb->dist_name, "Simple", "dist_name is 'Simple'" );
   19 
   20 # vim:ts=2:sw=2:et:sta:sts=2