Файл: documentation/syntaxhighlighter/tests/cases/004_url_parsing.html
Строк: 27
<?php
<pre id="sh_004_url_parsing" class="brush: as3;">
/**
* Please see <http://www.alexgorbatchev.come/?test=1&y=2>
*/
var home = "http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;";
// < http://www.gnu.org/licenses/?test=1&y=2 >.
// Test embedded URLs that terminate at a left angle bracket.
// See bug #28: http://bitbucket.org/alexg/syntaxhighlighter/issue/28/
"<location>http://www.example.com/song2.mp3</location>";
</pre>
<script type="text/javascript">
queue(function()
{
var $sh;
module('004_url_parsing');
test('check that urls are present', function()
{
$sh = $('#sh_004_url_parsing');
ok_sh($sh);
ok_toolbar($sh);
ok_code($sh);
var expected = [
'http://www.alexgorbatchev.come/?test=1&y=2',
'http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;',
'http://www.gnu.org/licenses/?test=1&y=2',
'http://bitbucket.org/alexg/syntaxhighlighter/issue/28/',
'http://www.example.com/song2.mp3'
];
$sh.find('td.code a').each(function(index)
{
equal($(this).attr('href'), expected[index], 'href');
equal($(this).text(), expected[index], 'text');
})
});
});
</script>
?>