+ fun test_process_code_ext1 do
+ var test = """
+Here is an example of AppleScript:
+~~~
+tell application "Foo"
+ beep
+end tell
+
+<div class="footer">
+ © 2004 Foo Corporation
+</div>
+~~~
+"""
+ var exp = """
+<p>Here is an example of AppleScript:</p>
+<pre><code>tell application "Foo"
+ beep
+end tell
+
+<div class="footer">
+ &copy; 2004 Foo Corporation
+</div>
+</code></pre>
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+
+ fun test_process_code_ext2 do
+ var test = """
+Here is an example of AppleScript:
+```
+tell application "Foo"
+ beep
+end tell
+
+<div class="footer">
+ © 2004 Foo Corporation
+</div>
+```
+"""
+ var exp = """
+<p>Here is an example of AppleScript:</p>
+<pre><code>tell application "Foo"
+ beep
+end tell
+
+<div class="footer">
+ &copy; 2004 Foo Corporation
+</div>
+</code></pre>
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+
+ fun test_process_code_ext3 do
+ var proc = new MarkdownProcessor
+ proc.ext_mode = false
+
+ var test = """
+Here is an example of AppleScript:
+ beep
+"""
+ var exp = """
+<p>Here is an example of AppleScript:
+beep</p>
+"""
+ var res = proc.process(test).write_to_string
+ assert res == exp
+ end
+
+ fun test_process_code_ext4 do
+ var test = """
+Here is an example of AppleScript:
+ beep
+"""
+ var exp = """
+<p>Here is an example of AppleScript:</p>
+<pre><code>beep
+</code></pre>
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+
+ fun test_process_code_ext5 do
+ var test = """
+```nit
+print "Hello World!"
+```
+"""
+ var exp = """
+<pre class="nit"><code>print "Hello World!"
+</code></pre>
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+