File-PM2File

 view release on metacpan or  search on metacpan

t/File/PM2File.pm  view on Meta::CPAN


########
# The Test::STDmaker module uses the data after the __DATA__ 
# token to automatically generate the this file.
#
# Don't edit anything before __DATA_. Edit instead
# the data after the __DATA__ token.
#
# ANY CHANGES MADE BEFORE the  __DATA__ token WILL BE LOST
#
# the next time Test::STDmaker generates this file.
#
#


=head1 TITLE PAGE

 Detailed Software Test Description (STD)

 for

 Perl File::PM2File Program Module

 Revision: -

 Version: 

 Date: 2004/04/08

 Prepared for: General Public 

 Prepared by:  http://www.SoftwareDiamonds.com support@SoftwareDiamonds.com

 Classification: None

=head1 SCOPE

This detail STD and the 
L<General Perl Program Module (PM) STD|Test::STD::PerlSTD>
establishes the tests to verify the
requirements of Perl Program Module (PM) L<File::PM2File|File::PM2File>

The format of this STD is a tailored L<2167A STD DID|Docs::US_DOD::STD>.
in accordance with 
L<Detail STD Format|Test::STDmaker/Detail STD Format>.

#######
#  
#  4. TEST DESCRIPTIONS
#
#  4.1 Test 001
#
#  ..
#
#  4.x Test x
#
#

=head1 TEST DESCRIPTIONS

The test descriptions uses a legend to
identify different aspects of a test description
in accordance with
L<STD FormDB Test Description Fields|Test::STDmaker/STD FormDB Test Description Fields>.

=head2 Test Plan

 T: 5^

=head2 ok: 1


  C:
     use File::Spec;
     use File::Package;
     my $fp = 'File::Package';
     my $uut = 'File::PM2File';
     my $loaded = '';
     # Use the test file as an example since no its absolue path
     # Calculate the absolute file, relative file, and include directory
     my $relative_file = File::Spec->catfile('t', 'File', 'PM2File.pm'); 
     my $restore_dir = cwd();
     chdir File::Spec->updir();
     chdir File::Spec->updir();
     my $include_dir = cwd();
     chdir $restore_dir;
     my $OS = $^^O;  # need to escape ^^
     unless ($OS) {   # on some perls $^^O is not defined
         require Config;
         $OS = $Config::Config{'osname'};
     } 
     $include_dir =~ s=/=\\=g if( $^^O eq 'MSWin32');
     my $absolute_file = File::Spec->catfile($include_dir, 't', 'File', 'PM2File.pm');
     $absolute_file =~ s=.t$=.pm=;
     # Put base directory as the first in the @INC path
     my @restore_inc = @INC;
     unshift @INC, $include_dir;
 ^
 VO: ^
  N: UUT not loaded^
  A: $loaded = $fp->is_package_loaded('File::PM2File')^
  E:  ''^
 ok: 1^

=head2 ok: 2

  N: Load UUT^
  S: $loaded^
  A: my $errors = $fp->load_package( 'File::PM2File' )^
 SE: ''^
 ok: 2^

=head2 ok: 3

  N: pm2require^
  A: $uut->pm2require( "$uut")^
  E: File::Spec->catfile('File', 'PM2File' . '.pm')^
 ok: 3^

=head2 ok: 4



( run in 1.727 second using v1.01-cache-2.11-cpan-39bf76dae61 )