diff options
author | JinweiClarkChao <[email protected]> | 2014-02-20 12:50:15 +0800 |
---|---|---|
committer | JinweiClarkChao <[email protected]> | 2014-02-20 12:52:51 +0800 |
commit | 31fb10f393fbfd4d7adf528ec70624d2b8d247a8 (patch) | |
tree | 1009bb2a4f5fe89b8bc822b68104018ea8df5261 /Blocks/syntax/tests/cases/004_url_parsing.html | |
parent | be404e3e01ca839e730c884309c25abef10863c9 (diff) | |
download | jinwei.me-31fb10f393fbfd4d7adf528ec70624d2b8d247a8.tar.gz |
Six Blocks Version
Diffstat (limited to 'Blocks/syntax/tests/cases/004_url_parsing.html')
-rw-r--r-- | Blocks/syntax/tests/cases/004_url_parsing.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Blocks/syntax/tests/cases/004_url_parsing.html b/Blocks/syntax/tests/cases/004_url_parsing.html new file mode 100644 index 0000000..d489a66 --- /dev/null +++ b/Blocks/syntax/tests/cases/004_url_parsing.html | |||
@@ -0,0 +1,43 @@ | |||
1 | <pre id="sh_004_url_parsing" class="brush: as3;"> | ||
2 | /** | ||
3 | * Please see <http://www.alexgorbatchev.come/?test=1&y=2> | ||
4 | */ | ||
5 | var home = "http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;"; | ||
6 | // < http://www.gnu.org/licenses/?test=1&y=2 >. | ||
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"> | ||
14 | queue(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> \ No newline at end of file | ||