https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ADiff%2Ftestcases
Module:Diff/testcases - Revision history
2025-05-30T05:18:45Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.3
https://en.wikipedia.org/w/index.php?title=Module:Diff/testcases&diff=1220572338&oldid=prev
W.andrea: Found the problem. Space adjacent to a tag gets escaped.
2024-04-24T16:57:38Z
<p>Found the problem. Space adjacent to a tag gets escaped.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:57, 24 April 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del><del style="font-weight: bold; text-decoration: none;"> </del>change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins><del style="font-weight: bold; text-decoration: none;"> </del>change</div></td></tr></table>'<del style="font-weight: bold; text-decoration: none;">, {nowiki=1}</del>)</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del><ins style="font-weight: bold; text-decoration: none;">&#32;</ins>change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins><ins style="font-weight: bold; text-decoration: none;">&#32;</ins>change</div></td></tr></table>')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
W.andrea
https://en.wikipedia.org/w/index.php?title=Module:Diff/testcases&diff=1220572164&oldid=prev
W.andrea: Add {{nowiki}} to pin down why second test case is failing.
2024-04-24T16:56:22Z
<p>Add {{nowiki}} to pin down why second test case is failing.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:56, 24 April 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del> change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins> change</div></td></tr></table>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del> change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins> change</div></td></tr></table>'<ins style="font-weight: bold; text-decoration: none;">, {nowiki=1}</ins>)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
W.andrea
https://en.wikipedia.org/w/index.php?title=Module:Diff/testcases&diff=1220568463&oldid=prev
W.andrea: I guess I'm supposed to fill in the module name
2024-04-24T16:29:37Z
<p>I guess I'm supposed to fill in the module name</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:29, 24 April 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>-- Unit tests for [[Module:<del style="font-weight: bold; text-decoration: none;">{{ROOTPAGENAME}}</del>]]. Click talk page to run tests.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>-- Unit tests for [[Module:<ins style="font-weight: bold; text-decoration: none;">Diff</ins>]]. Click talk page to run tests.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = require('Module:UnitTests')</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = require('Module:UnitTests')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
W.andrea
https://en.wikipedia.org/w/index.php?title=Module:Diff/testcases&diff=1220565917&oldid=prev
W.andrea: tbody unsupported, but automatically generated.
2024-04-24T16:12:34Z
<p><a href="/wiki/Help:HTML_in_wikitext#thead,_tfoot,_tbody" title="Help:HTML in wikitext">tbody unsupported, but automatically generated</a>.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:12, 24 April 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_no_change()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_no_change()</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|no change|no change}}', '<table class="diff" style="width:100%"<del style="font-weight: bold; text-decoration: none;">><tbody</del>><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td></tr<del style="font-weight: bold; text-decoration: none;">></tbody</del>></table>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|no change|no change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td></tr></table>')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p:test_one_change()</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"<del style="font-weight: bold; text-decoration: none;">><tbody</del>><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del> change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins> change</div></td></tr<del style="font-weight: bold; text-decoration: none;">></tbody</del>></table>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del> change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins> change</div></td></tr></table>')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
W.andrea
https://en.wikipedia.org/w/index.php?title=Module:Diff/testcases&diff=1220563874&oldid=prev
W.andrea: Add basic tests in preparation for a more complicated one.
2024-04-24T15:58:20Z
<p>Add basic tests in preparation for a more complicated one.</p>
<p><b>New page</b></p><div>-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.<br />
local p = require('Module:UnitTests')<br />
<br />
function p:test_no_change()<br />
self:preprocess_equals('{{#invoke:Diff|main|no change|no change}}', '<table class="diff" style="width:100%"><tbody><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;">no change</div></td></tr></tbody></table>')<br />
end<br />
<br />
function p:test_one_change()<br />
self:preprocess_equals('{{#invoke:Diff|main|one change|a change}}', '<table class="diff" style="width:100%"><tbody><tr><td class="diff-marker" style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">−</td><td class="diff-deletedline" style="border-color: #ffe49c; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><del class="diffchange diffchange-inline" style="background: #feeec8; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">one</del> change</div></td><td style="width: 2%; padding: 0.25em; font-weight: bold;font-size: 1.25em; text-align: end;">+</td><td class="diff-addedline" style="border-color: #a3d3ff; width: 48%; border-style: solid; border-radius: 0.33em; padding: 0.33em 0.5em; font-size: 1em; font-family: monospace; white-space: pre-wrap; border-width: 1px 1px 1px 4px; -webkit-border-end-width: 1px; -webkit-border-start-width: 4px; -moz-border-end-width: 1px; -moz-border-start-width: 4px;"><div style="word-wrap: break-word; direction: ltr;"><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">a</ins> change</div></td></tr></tbody></table>')<br />
end<br />
<br />
return p</div>
W.andrea