Skip to content

Commit

Permalink
Item11383: Fix unit tests
Browse files Browse the repository at this point in the history
Modernized HTML is good,  but it breaks unit tests. Would be nice if the
fixes also included the needed changes to unit tests.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@13526 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Dec 31, 2011
1 parent a273720 commit 4ec383a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ INPUT
<table border="1" class="foswikiTable" rules="none">
<tbody>
<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
<td bgcolor="#ffffff" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <img src="%PUBURLPATH%/%SYSTEMWEB%/DocumentGraphics/choice-yes.png" alt="DONE" title="DONE" width="16" height="16" border="0" /> </td>
<td bgcolor="#ffffff" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <img alt=DONE height=16 src=%PUBURLPATH%/%SYSTEMWEB%/DocumentGraphics/choice-yes.png title=DONE width=16></img> </td>
<td bgcolor="#ffffff" class="foswikiTableCol1 foswikiLastCol foswikiLast"> <a href="$viewUrl" class="foswikiCurrentTopicLink">$topicName</a> </td>
</tr>
</tbody>
Expand Down
9 changes: 5 additions & 4 deletions TwistyPlugin/test/unit/TwistyPlugin/TwistyPluginTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sub do_test {
my $session = $this->{session};
my $webName = $web || $this->{test_web};
my $topicName = $topic || $this->{test_topic};
my $actin = $actual;

$actual =
Foswiki::Func::expandCommonVariables( $actual, $topicName, $webName );
Expand Down Expand Up @@ -182,13 +183,13 @@ EXPECTED1
$expected .= "$pubUrlSystemWeb/DocumentGraphics/toggleopen-small.png";

$expected .= <<'EXPECTED2';
" border="0" alt="" /><span class="foswikiLinkLabel foswikiUnvisited">Show...</span></a></span><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1hide" style="display:none" class="twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><img src="
" alt="" /><span class="foswikiLinkLabel foswikiUnvisited">Show...</span></a></span><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1hide" style="display:none" class="twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><img src="
EXPECTED2

$expected .= "$pubUrlSystemWeb/DocumentGraphics/toggleclose-small.png";

$expected .= <<'EXPECTED3';
" border="0" alt="" /><span class="foswikiLinkLabel foswikiUnvisited">Hide</span></a></span> </div><div class="twistyPlugin"><div id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1toggle" style="" class="twistyContent twistyInited">
" alt="" /><span class="foswikiLinkLabel foswikiUnvisited">Hide</span></a></span> </div><div class="twistyPlugin"><div id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1toggle" style="" class="twistyContent twistyInited">
content with icons
</div></div>
EXPECTED3
Expand Down Expand Up @@ -259,13 +260,13 @@ EXPECTED1
$expected .= "$pubUrlSystemWeb/DocumentGraphics/choice-yes.png";

$expected .= <<'EXPECTED2';
" alt="DONE" title="DONE" width="16" height="16" border="0" /></span></a></span><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1hide" style="display:none" class="twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><span class="foswikiLinkLabel foswikiUnvisited"><img src="
" alt="DONE" title="DONE" width="16" height="16" /></span></a></span><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1hide" style="display:none" class="twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><span class="foswikiLinkLabel foswikiUnvisited"><img src="
EXPECTED2

$expected .= "$pubUrlSystemWeb/DocumentGraphics/choice-yes.png";

$expected .= <<'EXPECTED3';
" alt="DONE" title="DONE" width="16" height="16" border="0" /></span></a></span></span><span class="twistyPlugin"><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1toggle" style="" class="twistyContent twistyInited">content</span></span>
" alt="DONE" title="DONE" width="16" height="16" /></span></a></span></span><span class="twistyPlugin"><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingTestTopicTwistyFormatting1toggle" style="" class="twistyContent twistyInited">content</span></span>
EXPECTED3

# fix introduced linebreaks
Expand Down
2 changes: 1 addition & 1 deletion UnitTestContrib/test/unit/ViewScriptTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pretemplate<hr />
<span class="foswikiNewLink">MissingWikiWord<a href="$editUrl?topicparent=TemporaryViewScriptTestWebViewScript.TestTopic2" rel="nofollow" title="Create this topic">?</a></span> <br />
ExclamationEscape <br />
NopEscape
<font color="#ff0000"> <pre> adsf </pre> <pre> qwerty </pre>
<span class='foswikiRedFG'> <pre> adsf </pre> <pre> qwerty </pre>
<p>A Paragraph </p>
#anchor
<a href="http://blah.com/">asdf</a>
Expand Down
2 changes: 1 addition & 1 deletion core/data/TestCases/TestCaseAutoNestedVerbatim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Usage:
</pre>
Lorem ipsum is pig latin for "that's my lorry, that is".
<p />
-- <font color="#0000ff">AlexanderTheGeek</font> - 01 Nov 2004
-- <span class=foswikiBlueFG>AlexanderTheGeek</span> - 01 Nov 2004
<!-- /expected -->
---++ Actual at end of topic
<!-- actual -->
Expand Down

0 comments on commit 4ec383a

Please sign in to comment.