Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item9041: Show that TCP's link-patching is broken
git-svn-id: http://svn.foswiki.org/trunk@7930 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
MichaelTempest
authored and
MichaelTempest
committed
Jun 26, 2010
1 parent
ee69d6b
commit ecf1c65
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
TWikiCompatibilityPlugin/test/unit/TWikiCompatibilityPlugin/TWikiLinkTests.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Unit tests for handling of links | ||
# | ||
|
||
package TWikiLinkTests; | ||
use FoswikiFnTestCase; | ||
our @ISA = qw( FoswikiFnTestCase ); | ||
|
||
use strict; | ||
use Foswiki::Func; | ||
|
||
sub new { | ||
my $self = shift()->SUPER::new( "Link", @_ ); | ||
return $self; | ||
} | ||
|
||
sub test_renamedMainTopic { | ||
my $this = shift; | ||
my $goodLink = Foswiki::Func::renderText('Main.SitePreferences'); | ||
my $oldLink = Foswiki::Func::renderText('Main.TWikiPreferences'); | ||
$this->assert_str_equals($goodLink, $oldLink); | ||
} | ||
|
||
sub test_renamedSystemTopic { | ||
my $this = shift; | ||
my $goodLink = Foswiki::Func::renderText('System.BeginnersStartHere'); | ||
my $oldLink = Foswiki::Func::renderText('TWiki.ATasteOfTWiki'); | ||
$this->assert_str_equals($goodLink, $oldLink); | ||
} | ||
|
||
sub test_renamedSystemTopicWithLinkText { | ||
my $this = shift; | ||
my $goodLink = Foswiki::Func::renderText('[[System.BeginnersStartHere][Link Text]]'); | ||
my $oldLink = Foswiki::Func::renderText('[[TWiki.ATasteOfTWiki][Link Text]]'); | ||
$this->assert_str_equals($goodLink, $oldLink); | ||
} | ||
|
||
1; |