/lib/syntaxhighlighter_3.0.83/tests/cases/004_url_parsing.html
HTML | 43 lines | 36 code | 7 blank | 0 comment | 0 complexity | e47e6427e70127d6cd783e7dae3dc9f5 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
- <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>