Skip to content

Commit

Permalink
Item11365: Add tests to confirm doc
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@13448 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Dec 17, 2011
1 parent 070fc8e commit b373e4f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions UnitTestContrib/test/unit/FuncTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2569,6 +2569,19 @@ sub _test_path_func {
$this->assert( ref($func) eq 'CODE' );
$junk ||= '';
$this->_save_config();
$Foswiki::cfg{ScriptUrlPath} = '/path/to/bin';
delete $Foswiki::cfg{ScriptUrlPaths};
print "Testing no args\n" if TRACE;
$this->assert_str_equals( $junk . '/path/to/bin', $func->() );
print "Testing script only\n" if TRACE;
$this->assert_str_equals( $junk . '/path/to/bin/save',
$func->( undef, undef, 'save' ) );
print "Testing script/Web/Topic\n" if TRACE;
$this->assert_str_equals(
$junk . '/path/to/bin/save/Web/Topic',
$func->( 'Web', 'Topic', 'save' )
);

foreach my $test (@scripturl_tests) {
$Foswiki::cfg{ScriptUrlPath} = '/path/to/bin';
delete $Foswiki::cfg{ScriptUrlPaths};
Expand Down

0 comments on commit b373e4f

Please sign in to comment.