Permalink
Browse files

weblib MDL-21183 Commented out some unreasonable unit tests

  • Loading branch information...
1 parent 77a6f29 commit 732cef98a7f0eb4a423ae1c1ff25cd9344fe3fa6 Andrew Davis committed Jan 14, 2010
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/simpletest/testweblib.php
@@ -135,8 +135,8 @@ function test_convert_urls_into_links() {
'URL: <a href="http://moodle.org">www.moodle.org</a>' => 'URL: <a href="http://moodle.org">www.moodle.org</a>',
'URL: <a href="http://moodle.org"> http://moodle.org</a>' => 'URL: <a href="http://moodle.org"> http://moodle.org</a>',
'URL: <a href="http://moodle.org"> www.moodle.org</a>' => 'URL: <a href="http://moodle.org"> www.moodle.org</a>',
- //escaped anchor tag. todo decide whether we want to make this work. MDL-21183
- htmlspecialchars('escaped anchor tag <a href="http://moodle.org">www.moodle.org</a>') => 'escaped anchor tag &lt;a href="http://moodle.org"&gt; www.moodle.org&lt;/a&gt;',
+ //escaped anchor tag. Commented out as part of MDL-21183
+ //htmlspecialchars('escaped anchor tag <a href="http://moodle.org">www.moodle.org</a>') => 'escaped anchor tag &lt;a href="http://moodle.org"&gt; www.moodle.org&lt;/a&gt;',
//trailing fullstop
'URL: http://moodle.org/s/i=1&j=2.' => 'URL: <a href="http://moodle.org/s/i=1&j=2" target="_blank">http://moodle.org/s/i=1&j=2</a>.',
'URL: www.moodle.org/s/i=1&amp;j=2.' => 'URL: <a href="http://www.moodle.org/s/i=1&amp;j=2" target="_blank">www.moodle.org/s/i=1&amp;j=2</a>.',
@@ -186,8 +186,8 @@ function test_convert_urls_into_links() {
'<form name="input" action="http://moodle.org/submit.asp" method="get">'=>'<form name="input" action="http://moodle.org/submit.asp" method="get">',
//partially escaped img tag
'partially escaped img tag &lt;img src="http://moodle.org/logo/logo-240x60.gif" />' => 'partially escaped img tag &lt;img src="http://moodle.org/logo/logo-240x60.gif" />',
- //fully escaped img tag. Do we want this to work on escaped text? MDL-21183
- htmlspecialchars('fully escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />') => 'fully escaped img tag &lt;img src="http://moodle.org/logo/logo-240x60.gif" /&gt;',
+ //fully escaped img tag. Commented out as part of MDL-21183
+ //htmlspecialchars('fully escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />') => 'fully escaped img tag &lt;img src="http://moodle.org/logo/logo-240x60.gif" /&gt;',
//Double http with www
'One more link like http://www.moodle.org to test' => 'One more link like <a href="http://www.moodle.org" target="_blank">http://www.moodle.org</a> to test',
//Encoded URLs in the path
@@ -196,11 +196,11 @@ function test_convert_urls_into_links() {
//Encoded URLs in the query
'URL: http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1' => 'URL: <a href="http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1" target="_blank">http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1</a>',
'URL: www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1' => 'URL: <a href="http://www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1" target="_blank">www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1</a>',
- //URLs in Javascript
- 'var url="http://moodle.org";'=>'var url="http://moodle.org";',
- 'var url = "http://moodle.org";'=>'var url = "http://moodle.org";',
- 'var url="www.moodle.org";'=>'var url="www.moodle.org";',
- 'var url = "www.moodle.org";'=>'var url = "www.moodle.org";',
+ //URLs in Javascript. Commented out as part of MDL-21183
+ //'var url="http://moodle.org";'=>'var url="http://moodle.org";',
+ //'var url = "http://moodle.org";'=>'var url = "http://moodle.org";',
+ //'var url="www.moodle.org";'=>'var url="www.moodle.org";',
+ //'var url = "www.moodle.org";'=>'var url = "www.moodle.org";',
//doctype. do we care about this failing?
//'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'=>'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'
);

0 comments on commit 732cef9

Please sign in to comment.