Skip to content

Commit

Permalink
Item10883: Add comment to LocalLib example
Browse files Browse the repository at this point in the history
Point out that backslashes don't work for windows users.
Also added unit test to see if package installer can handle spaces in
the file path.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@11927 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jun 15, 2011
1 parent 23df570 commit eb48242
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions UnitTestContrib/test/unit/ConfigureTests.pm
Expand Up @@ -544,6 +544,14 @@ sub test_Util_mapTarget {
$results = Foswiki::Configure::Util::mapTarget( "C:/asdf/", "$file" );
$this->assert_str_equals( "C:/asdf/cgi-bin/compare.pl", $results );

# Remap bin directory and script suffix - Include spaces in the path

$Foswiki::cfg{ScriptSuffix} = '.pl';
$Foswiki::cfg{ScriptDir} = 'C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/wiki/bin';
$file = 'bin/compare';
$results = Foswiki::Configure::Util::mapTarget( 'C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/wiki/', "$file" );
$this->assert_str_equals( 'C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/wiki/bin/compare.pl', $results );

# Remap the data/mime.types file location

$Foswiki::cfg{MimeTypesFileName} = "$Foswiki::cfg{DataDir}/mymime.types";
Expand Down
2 changes: 2 additions & 0 deletions core/bin/LocalLib.cfg.txt
Expand Up @@ -12,6 +12,8 @@ use vars qw( $foswikiLibPath $CPANBASE );
#
# REQUIRED
# The absolute path to the 'lib' directory in your installation..
# Windows users: Use forward slash - C:/absolute/path/to/lib
# backslash like C:\ will NOT work

$foswikiLibPath = "/absolute/path/to/your/lib";

Expand Down

0 comments on commit eb48242

Please sign in to comment.