source: tol/TolJava/WebTOLJavaDEMO/web/sh/tests/cases/004_url_parsing.html @ 9887b93

1941-docker-image-to-testdevel
Last change on this file since 9887b93 was 9887b93, checked in by Humberto Carralero <hacarralero@…>, 15 years ago

Importing TolJava

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3900 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.1 KB
Line 
1<pre id="sh_004_url_parsing" class="brush: as3;">
2/**
3 * Please see &lt;http://www.alexgorbatchev.come/?test=1&y=2&gt;
4 */
5var home = "http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;";
6// &lt; http://www.gnu.org/licenses/?test=1&y=2 &gt;.
7
8// Test embedded URLs that terminate at a left angle bracket.
9// See bug #28: http://bitbucket.org/alexg/syntaxhighlighter/issue/28/
10"<location>http://www.example.com/song2.mp3</location>";
11</pre>
12
13<script type="text/javascript">
14queue(function()
15{
16        var $sh;
17       
18        module('004_url_parsing');
19
20        test('check that urls are present', function()
21        {
22                $sh = $('#sh_004_url_parsing');
23               
24                ok_sh($sh);
25                ok_toolbar($sh);
26                ok_code($sh);
27               
28                var expected = [
29                        'http://www.alexgorbatchev.come/?test=1&y=2',
30                        'http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;',
31                        'http://www.gnu.org/licenses/?test=1&y=2',
32                        'http://bitbucket.org/alexg/syntaxhighlighter/issue/28/',
33                        'http://www.example.com/song2.mp3'
34                ];
35               
36                $sh.find('td.code a').each(function(index)
37                {
38                        equal($(this).attr('href'), expected[index], 'href');
39                        equal($(this).text(), expected[index], 'text');
40                })
41        });
42});
43</script>
Note: See TracBrowser for help on using the repository browser.