Skip to content

Commit

Permalink
Item11389: fix unit tests as Arthur changed the rendering of named an…
Browse files Browse the repository at this point in the history
…chors

git-svn-id: http://svn.foswiki.org/trunk@14108 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Feb 26, 2012
1 parent fa8e93c commit d4b77fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 22 deletions.
4 changes: 2 additions & 2 deletions HistoryPlugin/test/unit/HistoryPlugin/HistoryPluginTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ sub test_header {
my $date = $this->_getDate($topicObject);

my $expected = <<EXPECTED;
<nop><h2><a name="header"></a> header </h2>
<nop><h2 id="header"> header </h2>
r4 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
r3 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
r2 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
Expand Down Expand Up @@ -351,7 +351,7 @@ sub test_footer {
r3 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
r2 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
r1 - $date - <a href="$url/$this->{users_web}/ScumBag">ScumBag</a><br />
<nop><h2><a name="footer"></a> footer </h2>
<nop><h2 id="footer"> footer </h2>
EXPECTED

my $actual = $topicObject->expandMacros(<<'ACTUAL');
Expand Down
4 changes: 2 additions & 2 deletions UnitTestContrib/test/unit/RenderFormTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ sub test_render_for_edit {
<tr><th>Issue Name</th><td align="left"><input type="text" name="IssueName" value="_An issue_" size="40" class="foswikiInputField" /></td></tr>
<tr><th>State</th><td align="left"><table><tr><td><label><input type="radio" name="State" value="none" title="none" class="foswikiRadioButton"/>none</label></td></tr></table></td></tr>
<tr><th>Issue Description</th><td align="left"><input type="hidden" name="IssueDescription" value="---+ Example problem" /><div><nop><h1>
<a name="Example_problem"> </a> Example problem </h1></div></td></tr>
<tr><th>Issue Description</th><td align="left"><input type="hidden"
name="IssueDescription" value="---+ Example problem" /><div><nop><h1 id="Example_problem"> Example problem </h1></div></td></tr>
<tr><th>Issue 1</th><td align="left"><select name="Issue1" class="foswikiSelect" size="1"></select></td></tr>
<tr><th>Issue 2EXTRA</th><td align="left">SWEET</td></tr>
<tr><th>Issue 3</th><td align="left"><table></table><input type="hidden" name="Issue3" value="" /></td></tr>
Expand Down
6 changes: 3 additions & 3 deletions core/data/TestCases/TestCaseAutoFormatting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Designed by: Crawford Currie
---++ Headings
---+++ Expected
<!-- expected HEADS -->
<h2><a name="Sushi_AN1"></a>Sushi</h2>
<h3><a name="Maguro_AN1"></a>Maguro</h3>
<h2 id="Sushi">Sushi</h2>
<h3 id="Maguro">Maguro</h3>
<!-- /expected -->
---+++ Actual
<!-- actual -->
Expand Down Expand Up @@ -435,7 +435,7 @@ escaped:
<p />
<a class="foswikiCurrentTopicLink" href="#MyAnchor">Jump</a>
<p />
<a name="MyAnchor"></a> To here
<span id="MyAnchor"></span> To here
<!-- /expected -->
---+++ Actual
<!-- actual -->
Expand Down
4 changes: 2 additions & 2 deletions core/data/TestCases/TestCaseAutoIncludeAttachment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Designed by: Crawford Currie
---+ Existing attachment
---++ Expected
<!-- expected -->
<h1><a name="heading_1_AN1"></a>heading 1</h1>
<h1 id="heading_1">heading 1</h1>
<!-- /expected -->
---++ Actual
<!-- actual -->
Expand All @@ -21,7 +21,7 @@ Designed by: Crawford Currie
---++ Expected
<!-- manual expected -->
<p />
<h1><a name="Not_Found"> </a> Not Found </h1>
<h1 id="Not_Found"> Not Found </h1>
<span class='foswikiAlert'>
Failed to include URL <a href="%ATTACHURLPATH%/noexist" target="_top">http://daphne/foswiki/trunk/core/pub/TestCases/TestCaseAutoIncludeAttachment/noexist</a> Not Found
</span>
Expand Down
17 changes: 4 additions & 13 deletions core/data/TestCases/TestCaseAutoTOCManual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ anchors.

Designed by: Crawford Currie

Note that the "expected" is a bit wierd (doubled anchors in the TOC) because of
the way TOC is processed.

*Expected*
<!-- expected rex -->
<a name="ThisHeading"></a>
<span id="ThisHeading"></span>
This heading anchor

<p />
<a name="ThatHeading"></a>
<span id="ThatHeading"></span>
That heading anchor
<p />
<h1 id="ThatHeading_AN2"> ThatHeading </h1>
<h1 id="ThisHeading_AN2"> ThisHeading </h1>
<h1 id="ThatHeading_AN1"> ThatHeading </h1>
<h1 id="ThisHeading_AN1"> ThisHeading </h1>
<p />
<div class="foswikiToc" id="foswikiTOC">
<ul>
Expand All @@ -30,12 +27,6 @@ That heading anchor
<li>
<a href="?@REX(.*)#ThisHeading_AN1"> ThisHeading </a>
</li>
<li>
<a href="?@REX(.*)#ThatHeading_AN2"> ThatHeading </a>
</li>
<li>
<a href="?@REX(.*)#ThisHeading_AN2"> ThisHeading </a>
</li>
</ul>
</div>
<p />
Expand Down

0 comments on commit d4b77fa

Please sign in to comment.