aboutsummaryrefslogtreecommitdiff
blob: d489a66940a0eb90105f606dcdcd77605a577e03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<pre id="sh_004_url_parsing" class="brush: as3;">
/**
 * Please see &lt;http://www.alexgorbatchev.come/?test=1&y=2&gt;
 */
var home = "http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;";
// &lt; http://www.gnu.org/licenses/?test=1&y=2 &gt;.

// 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>
Powered by cgit v1.2.3 (git 2.41.0)