help the test track changes to Config.pm and how it handles paths
This commit is contained in:
parent
a61bd107fa
commit
7043f5d711
1 changed files with 3 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ our ( $SESSION, $WEBGUI_ROOT, $CONFIG_FILE, $WEBGUI_LIB, $WEBGUI_TEST_COLLATERAL
|
|||
use Config qw[];
|
||||
use IO::Handle qw[];
|
||||
use File::Spec qw[];
|
||||
use Cwd qw[];
|
||||
use Test::MockObject::Extends;
|
||||
use WebGUI::PseudoRequest;
|
||||
use Scalar::Util qw( blessed );
|
||||
|
|
@ -83,10 +84,12 @@ BEGIN {
|
|||
unless ( File::Spec->file_name_is_absolute($WEBGUI_ROOT) ) {
|
||||
$WEBGUI_ROOT = File::Spec->rel2abs($WEBGUI_ROOT);
|
||||
}
|
||||
warn $WEBGUI_ROOT."\n";
|
||||
|
||||
$CONFIG_FILE = ( File::Spec->splitpath( $WEBGUI_ROOT ) )[2];
|
||||
$WEBGUI_ROOT = substr( $WEBGUI_ROOT, 0, index( $WEBGUI_ROOT, File::Spec->catdir( 'etc', $CONFIG_FILE ) ) );
|
||||
$WEBGUI_ROOT = File::Spec->canonpath($WEBGUI_ROOT);
|
||||
$WEBGUI_ROOT = Cwd::realpath($WEBGUI_ROOT);
|
||||
$WEBGUI_TEST_COLLATERAL = File::Spec->catdir($WEBGUI_ROOT, 't', 'supporting_collateral');
|
||||
|
||||
my ($volume,$directories) = File::Spec->splitpath( $WEBGUI_ROOT, 'no_file' );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue