PageRenderTime 45ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  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. */
  5. var 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. // Test embedded URLs that terminate at a left angle bracket.
  8. // See bug #28: http://bitbucket.org/alexg/syntaxhighlighter/issue/28/
  9. "<location>http://www.example.com/song2.mp3</location>";
  10. </pre>
  11. <script type="text/javascript">
  12. queue(function()
  13. {
  14. var $sh;
  15. module('004_url_parsing');
  16. test('check that urls are present', function()
  17. {
  18. $sh = $('#sh_004_url_parsing');
  19. ok_sh($sh);
  20. ok_toolbar($sh);
  21. ok_code($sh);
  22. var expected = [
  23. 'http://www.alexgorbatchev.come/?test=1&y=2',
  24. 'http://www.alexgorbatchev.come/?test=1&y=2;test/1/2/3;',
  25. 'http://www.gnu.org/licenses/?test=1&y=2',
  26. 'http://bitbucket.org/alexg/syntaxhighlighter/issue/28/',
  27. 'http://www.example.com/song2.mp3'
  28. ];
  29. $sh.find('td.code a').each(function(index)
  30. {
  31. equal($(this).attr('href'), expected[index], 'href');
  32. equal($(this).text(), expected[index], 'text');
  33. })
  34. });
  35. });
  36. </script>