Permalink
Browse files

Item12092: more updated tests for new link format

git-svn-id: http://svn.foswiki.org/trunk@15762 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
ArthurClemens ArthurClemens
ArthurClemens authored and ArthurClemens committed Oct 28, 2012
1 parent 2f0d62a commit 1ad4fbad57af97bf33fabb9bfd3da1f1c1db5fd9
@@ -87,12 +87,8 @@ sub _rexeq {
$a =~ s/\@TIME/[012]\\d:[0-5]\\d/g;
my $wikiword = '[A-Z]+[a-z]+[A-Z]+\w+';
$a =~ s/\@WIKIWORD/$wikiword/og;
my $satWord = '<a [^>]*class="foswikiLink"[^>]*>' . $wikiword . '</a>';
my $unsatWord =
'<span [^>]*class="foswikiNewLink"[^>]*>'
. $wikiword
. '<a [^>]*><sup>\?</sup></a
</span>';
my $satWord = '<a [^>]*class="foswikiLink"[^>]*>' . $wikiword . '</a>';
my $unsatWord = '<a [^>]*class="foswikiNewLink"[^>]*>' . $wikiword . '</a>';
$a =~ s/!REX(\d+)!/$res[$1]/g;
$a =~ s!/!\/!g;
return $b =~ /^$a$/;
@@ -6427,7 +6427,7 @@ The WikiWord is being expanded in the first hit of the search results. 2nd and
<verbatim>
<div class="foswikiSearchResult"><div class="foswikiTopRow">
<a href="/Item10491/txt: <span class="foswikiNewLink">SomeString<a href="/bin/edit/System/SomeString?topicparent=System.WebSearch" rel="nofollow" title="Create this topic">?</a></span> "><b>txt: <span class="foswikiNewLink">SomeString<a href="/bin/edit/System/SomeString?topicparent=System.WebSearch" rel="nofollow" title="Create this topic">?</a></span> </b></a>
<a href="/Item10491/txt: <a class="foswikiNewLink" href="/bin/edit/System/SomeString?topicparent=System.WebSearch" rel="nofollow" title="Create this topic">SomeString</a> "><b>txt: <a class="foswikiNewLink" href="/bin/edit/System/SomeString?topicparent=System.WebSearch" rel="nofollow" title="Create this topic">SomeString</a> </b></a>
<div class="foswikiSummary"></div></div>
</verbatim>
@@ -331,7 +331,7 @@ sub test_squab_simple {
$text = $topicObject->renderTML($text);
$topicObject->finish();
$this->assert_matches(
qr!<span class="foswikiNewLink">$this->{test_web}<a href=".*?/$this->{test_web}/$this->{test_web}\?topicparent=$this->{test_web}\.NonExistant!,
qr!<a class="foswikiNewLink" href=".*?/$this->{test_web}/$this->{test_web}\?topicparent=$this->{test_web}\.NonExistant!,
$text
);
@@ -355,7 +355,7 @@ sub test_squab_subweb {
$text = $topicObject->renderTML($text);
$topicObject->finish();
$this->assert_matches(
qr!<span class="foswikiNewLink">Subweb<a href=".*?/$this->{sub_web_path}\?topicparent=$this->{test_web}.NonExistant!,
qr!<a class="foswikiNewLink" href=".*?/$this->{sub_web_path}\?topicparent=$this->{test_web}.NonExistant!,
$text
);
@@ -378,7 +378,7 @@ sub test_squab_subweb_full_path {
$text = $topicObject->renderTML($text);
$topicObject->finish();
$this->assert_matches(
qr!<span class="foswikiNewLink">$this->{test_web}.$this->{sub_web}<a href=".*?/$this->{sub_web_path}\?topicparent=$this->{test_web}.NonExistant!,
qr!<a class="foswikiNewLink" href=".*?/$this->{sub_web_path}\?topicparent=$this->{test_web}.NonExistant!,
$text
);
@@ -488,7 +488,7 @@ sub test_squab_path_to_topic_in_subweb {
($scripturl) = $scripturl =~ m/https?:\/\/[^\/]+(\/.*)/;
$this->assert_matches(
qr!<span class=.foswikiNewLink.>$this->{test_web}\.$this->{sub_web}\.WebHome<a href=.*?/$this->{test_web}/$this->{sub_web}/WebHome\?topicparent=$this->{test_web}\.NonExistant!,
qr!<a class=.foswikiNewLink. href=.*?/$this->{test_web}/$this->{sub_web}/WebHome\?topicparent=$this->{test_web}\.NonExistant!,
$text
);
@@ -273,7 +273,7 @@ sub test_render_textplain {
my $topic2plain = <<"HERE";
pretemplate<hr />
<span class="foswikiNewLink">MissingWikiWord<a href="$editUrl?topicparent=TemporaryViewScriptTestWebViewScript.TestTopic2" rel="nofollow" title="Create this topic">?</a></span> <br />
<a class="foswikiNewLink" href="$editUrl?topicparent=TemporaryViewScriptTestWebViewScript.TestTopic2" rel="nofollow" title="Create this topic">MissingWikiWord</a> <br />
ExclamationEscape <br />
NopEscape
<span class='foswikiRedFG'> <pre> adsf </pre> <pre> qwerty </pre>

0 comments on commit 1ad4fba

Please sign in to comment.