File-Where
view release on metacpan or search on metacpan
t/File/Where.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::Where Program Module
Revision: -
Version:
Date: 2004/05/04
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::Where|File::Where>
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: 26^
=head2 ok: 1
C:
use File::Spec;
use File::Copy;
use File::Path;
use File::Package;
my $fp = 'File::Package';
my $uut = 'File::Where';
my $loaded = '';
# Use the test file as an example since know its absolute path
#
my $test_script_dir = cwd();
chdir File::Spec->updir();
chdir File::Spec->updir();
my $include_dir = cwd();
chdir $test_script_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( $OS eq 'MSWin32');
$test_script_dir =~ s=/=\\=g if( $OS eq 'MSWin32');
# Put base directory as the first in the @INC path
#
my @restore_inc = @INC;
my $relative_file = File::Spec->catfile('t', 'File', 'Where.pm');
my $relative_dir1 = File::Spec->catdir('t', 'File');
my $relative_dir2 = File::Spec->catdir('t', 'Jolly_Green_Giant');
my $absolute_file1 = File::Spec->catfile($include_dir, 't', 'File', 'Where.pm');
my $absolute_dir1A = File::Spec->catdir($include_dir, 't', 'File');
my $absolute_dir1B = File::Spec->catdir($include_dir, 't');
mkpath (File::Spec->catdir($test_script_dir, 't','File'));
my $absolute_file2 = File::Spec->catfile($test_script_dir, 't', 'File', 'Where.pm');
my $absolute_dir2A = File::Spec->catdir($include_dir, 't', 'File', 't', 'File');
my $absolute_dir2B = File::Spec->catdir($include_dir, 't', 'File', 't');
#####
# If doing a target site install, blib going to be up front in @INC
# Locate the include directory with high probability of having the
# first File::Where in the include path.
#
# Really not important that that cheapen test somewhat by doing a quasi
# where search in that using this to test for a boundary condition where
# the class, 'File::Where', is the same as the program module 'File::Where
# that the 'where' subroutine/method is locating.
#
my $absolute_dir_where = File::Spec->catdir($include_dir, 'lib');
foreach (@INC) {
if ($_ =~ /blib/) {
$absolute_dir_where = $_ ;
( run in 2.017 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )