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

/lib/syntaxhighlighter_3.0.83/tests/cases/012_server_side.html

#
HTML | 35 lines | 29 code | 6 blank | 0 comment | 0 complexity | cca4a78ffa4a8780536e324c2c2e34d4 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. <script id="sh_012_server_side_input" type="text/plain">
  2. function helloWorld()
  3. {
  4. // this is great!
  5. for(var i = 0; i <= 1; i++)
  6. alert("yay");
  7. }
  8. </script>
  9. <div id="sh_012_server_side_output">
  10. </div>
  11. <script type="text/javascript">
  12. queue(function()
  13. {
  14. var $sh;
  15. module('012_server_side');
  16. test('generate markup', function()
  17. {
  18. var brush = new SyntaxHighlighter.brushes.JScript(),
  19. code = $('#sh_012_server_side_input').html()
  20. ;
  21. brush.init({ toolbar: false });
  22. $sh = $('#sh_012_server_side_output');
  23. $sh.html(brush.getHtml(code));
  24. ok_sh($sh);
  25. ok_gutter($sh);
  26. ok_code($sh);
  27. });
  28. });
  29. </script>