snap_test_code_bbcode.py 762 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. # snapshottest: v1 - https://goo.gl/zC4yUc
  3. from __future__ import unicode_literals
  4. from snapshottest import Snapshot
  5. snapshots = Snapshot()
  6. snapshots[
  7. "test_code_block_disables_parsing 1"
  8. ] = "<pre><code>Dolor [b]met.[/b]</code></pre>"
  9. snapshots[
  10. "test_code_with_language_parameter 1"
  11. ] = '<pre><code class="language-php">echo(&quot;Hello!&quot;);</code></pre>'
  12. snapshots[
  13. "test_code_with_quoted_language_parameter 1"
  14. ] = '<pre><code class="language-php">echo(&quot;Hello!&quot;);</code></pre>'
  15. snapshots[
  16. "test_multi_line_code 1"
  17. ] = """<pre><code>&lt;script&gt;
  18. alert(&quot;!&quot;)
  19. &lt;/script&gt;</code></pre>"""
  20. snapshots[
  21. "test_single_line_code 1"
  22. ] = "<pre><code>echo(&quot;Hello!&quot;);</code></pre>"