8027958: NASHORN TEST: Create tests to test markdown javascript engine work with Nashorn
authorsundar
Thu, 12 Dec 2013 19:02:43 +0530
changeset 22371 e6b607104dc6
parent 22370 c150d042ffff
child 22372 cedd324ae5b2
8027958: NASHORN TEST: Create tests to test markdown javascript engine work with Nashorn Summary: markdown test fix contributed by kshefov Reviewed-by: jlaskey
nashorn/make/build.xml
nashorn/make/project.properties
nashorn/test/script/markdown.js
nashorn/test/script/markdown/anchors-by-reference.js
nashorn/test/script/markdown/anchors-by-reference.js.EXPECTED
nashorn/test/script/markdown/automatic-anchors.js
nashorn/test/script/markdown/automatic-anchors.js.EXPECTED
nashorn/test/script/markdown/blockquote-nested-markdown.js
nashorn/test/script/markdown/blockquote-nested-markdown.js.EXPECTED
nashorn/test/script/markdown/blockquote.js
nashorn/test/script/markdown/blockquote.js.EXPECTED
nashorn/test/script/markdown/code-block-html-escape.js
nashorn/test/script/markdown/code-block-html-escape.js.EXPECTED
nashorn/test/script/markdown/code-block.js
nashorn/test/script/markdown/code-block.js.EXPECTED
nashorn/test/script/markdown/doubline-list.js
nashorn/test/script/markdown/doubline-list.js.EXPECTED
nashorn/test/script/markdown/emphasis.js
nashorn/test/script/markdown/emphasis.js.EXPECTED
nashorn/test/script/markdown/escaped-number-period.js
nashorn/test/script/markdown/escaped-number-period.js.EXPECTED
nashorn/test/script/markdown/escaping.js
nashorn/test/script/markdown/escaping.js.EXPECTED
nashorn/test/script/markdown/github-style-at-start.js
nashorn/test/script/markdown/github-style-at-start.js.EXPECTED
nashorn/test/script/markdown/github-style-codeblock.js
nashorn/test/script/markdown/github-style-codeblock.js.EXPECTED
nashorn/test/script/markdown/github-style-linebreaks.js
nashorn/test/script/markdown/github-style-linebreaks.js.EXPECTED
nashorn/test/script/markdown/h1-with-double-hash.js
nashorn/test/script/markdown/h1-with-double-hash.js.EXPECTED
nashorn/test/script/markdown/h1-with-equals.js
nashorn/test/script/markdown/h1-with-equals.js.EXPECTED
nashorn/test/script/markdown/h1-with-single-hash.js
nashorn/test/script/markdown/h1-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/h2-with-dashes.js
nashorn/test/script/markdown/h2-with-dashes.js.EXPECTED
nashorn/test/script/markdown/h2-with-double-hash.js
nashorn/test/script/markdown/h2-with-double-hash.js.EXPECTED
nashorn/test/script/markdown/h2-with-single-hash.js
nashorn/test/script/markdown/h2-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/h3-with-double-hash.js
nashorn/test/script/markdown/h3-with-double-hash.js.EXPECTED
nashorn/test/script/markdown/h3-with-single-hash.js
nashorn/test/script/markdown/h3-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/h4-with-single-hash.js
nashorn/test/script/markdown/h4-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/h5-with-single-hash.js
nashorn/test/script/markdown/h5-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/h6-with-single-hash.js
nashorn/test/script/markdown/h6-with-single-hash.js.EXPECTED
nashorn/test/script/markdown/horizontal-rules.js
nashorn/test/script/markdown/horizontal-rules.js.EXPECTED
nashorn/test/script/markdown/html5-strutural-tags.js
nashorn/test/script/markdown/html5-strutural-tags.js.EXPECTED
nashorn/test/script/markdown/images.js
nashorn/test/script/markdown/images.js.EXPECTED
nashorn/test/script/markdown/implicit-anchors.js
nashorn/test/script/markdown/implicit-anchors.js.EXPECTED
nashorn/test/script/markdown/inline-anchors.js
nashorn/test/script/markdown/inline-anchors.js.EXPECTED
nashorn/test/script/markdown/inline-code.js
nashorn/test/script/markdown/inline-code.js.EXPECTED
nashorn/test/script/markdown/inline-style-tag.js
nashorn/test/script/markdown/inline-style-tag.js.EXPECTED
nashorn/test/script/markdown/lazy-blockquote.js
nashorn/test/script/markdown/lazy-blockquote.js.EXPECTED
nashorn/test/script/markdown/list-with-blockquote.js
nashorn/test/script/markdown/list-with-blockquote.js.EXPECTED
nashorn/test/script/markdown/list-with-code.js
nashorn/test/script/markdown/list-with-code.js.EXPECTED
nashorn/test/script/markdown/multi-paragraph-list.js
nashorn/test/script/markdown/multi-paragraph-list.js.EXPECTED
nashorn/test/script/markdown/multiline-unordered-list.js
nashorn/test/script/markdown/multiline-unordered-list.js.EXPECTED
nashorn/test/script/markdown/nested-blockquote.js
nashorn/test/script/markdown/nested-blockquote.js.EXPECTED
nashorn/test/script/markdown/ordered-list-same-number.js
nashorn/test/script/markdown/ordered-list-same-number.js.EXPECTED
nashorn/test/script/markdown/ordered-list-wrong-numbers.js
nashorn/test/script/markdown/ordered-list-wrong-numbers.js.EXPECTED
nashorn/test/script/markdown/ordered-list.js
nashorn/test/script/markdown/ordered-list.js.EXPECTED
nashorn/test/script/markdown/relative-anchors.js
nashorn/test/script/markdown/relative-anchors.js.EXPECTED
nashorn/test/script/markdown/simple-paragraph.js
nashorn/test/script/markdown/simple-paragraph.js.EXPECTED
nashorn/test/script/markdown/strong.js
nashorn/test/script/markdown/strong.js.EXPECTED
nashorn/test/script/markdown/table-basic.js
nashorn/test/script/markdown/table-basic.js.EXPECTED
nashorn/test/script/markdown/table-large.js
nashorn/test/script/markdown/table-large.js.EXPECTED
nashorn/test/script/markdown/table-with-equals.js
nashorn/test/script/markdown/table-with-equals.js.EXPECTED
nashorn/test/script/markdown/unordered-list-asterisk.js
nashorn/test/script/markdown/unordered-list-asterisk.js.EXPECTED
nashorn/test/script/markdown/unordered-list-minus.js
nashorn/test/script/markdown/unordered-list-minus.js.EXPECTED
nashorn/test/script/markdown/unordered-list-plus.js
nashorn/test/script/markdown/unordered-list-plus.js.EXPECTED
nashorn/test/script/markdown/url-with-parenthesis.js
nashorn/test/script/markdown/url-with-parenthesis.js.EXPECTED
--- a/nashorn/make/build.xml	Mon Dec 02 18:19:26 2013 +0530
+++ b/nashorn/make/build.xml	Thu Dec 12 19:02:43 2013 +0530
@@ -304,6 +304,10 @@
     permission java.lang.RuntimePermission "nashorn.JavaReflection";
 };
 
+grant codeBase "file:/${basedir}/test/script/markdown.js" {
+    permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read";
+};
+
     </echo>
 
     <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace>    <!--hack for Windows - to make URLs with normal path separators -->
@@ -319,6 +323,7 @@
       <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/>
       <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/>
       <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/>
+      <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/>
   </target>
 
   <target name="check-testng" unless="testng.available">
@@ -399,6 +404,25 @@
     </testng>
   </target>
   
+  <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+    <fileset id="test.classes" dir="${build.test.classes.dir}">
+       <include name="**/framework/*Test.class"/>
+    </fileset>
+
+    <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
+       verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
+      <jvmarg line="${ext.class.path}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <propertyset>
+        <propertyref prefix="testmarkdown-test-sys-prop."/>
+        <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
+      </propertyset>
+      <classpath>
+          <pathelement path="${run.test.classpath}"/>
+      </classpath>
+    </testng>
+  </target>
+  
   <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
@@ -546,6 +570,11 @@
     <mkdir dir="${test.external.dir}/yui"/>
     <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
     <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
+    
+    <!-- showdown -->
+    <mkdir dir="${test.external.dir}/showdown"/>
+    <get src="https://raw.github.com/coreyti/showdown/master/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
+    <get src="https://raw.github.com/coreyti/showdown/master/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
 
   </target>
 
--- a/nashorn/make/project.properties	Mon Dec 02 18:19:26 2013 +0530
+++ b/nashorn/make/project.properties	Thu Dec 12 19:02:43 2013 +0530
@@ -122,6 +122,7 @@
 test262.dir=${test.external.dir}/test262
 test262.suite.dir=${test262.dir}/test/suite
 testjfx.dir=${test.script.dir}/jfx
+testmarkdown.dir=${test.script.dir}/markdown
 
 test-sys-prop.test.dir=${test.dir}
 test-sys-prop.test.js.roots=${test.basic.dir} ${test.error.dir} ${test.sandbox.dir} ${test.trusted.dir}
@@ -212,6 +213,16 @@
     ${test262.dir}/test/harness/framework.js \
     ${test262.dir}/test/harness/sta.js
 
+# testmarkdown test root
+testmarkdown-test-sys-prop.test.js.roots=${testmarkdown.dir}    
+
+# execute testmarkdown tests in shared nashorn context or not?
+testmarkdown-test-sys-prop.test.js.shared.context=false
+
+# framework root for markdown script tests
+testmarkdown-test-sys-prop.test.js.framework=\
+    ${test.script.dir}${file.separator}markdown.js
+
 # testjfx test root
 testjfx-test-sys-prop.test.js.roots=${testjfx.dir}   
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Base library for Showdown markdown engine Nashorn testing.
+ * @subtest
+ * 
+ * 
+ */
+
+load(__DIR__ + "external/showdown/showdown.js");
+var shdwn = Showdown;
+var window =  {
+    Showdown: shdwn
+}
+load(__DIR__ + "external/showdown/table.js");
+var converter = new Showdown.converter({extensions: ['table']});
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/anchors-by-reference.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThis is [an example][id] reference-style link.\nThis is [another] [foo] reference-style link.\nThis is [a third][bar] reference-style link.\nThis is [a fourth][4] reference-style link.\n\n  [id]: http://example.com/  \"Optional Title Here\"\n  [foo]: http://example.com/  (Optional Title Here)\n  [bar]: http://example.com/  (Optional Title Here)\n  [4]: <http://example.com/>\n    \"Optional Title Here\"";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/anchors-by-reference.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+<p>This is <a href="http://example.com/" title="Optional Title Here">an example</a> reference-style link.
+This is <a href="http://example.com/" title="Optional Title Here">another</a> reference-style link.
+This is <a href="http://example.com/" title="Optional Title Here">a third</a> reference-style link.
+This is <a href="http://example.com/" title="Optional Title Here">a fourth</a> reference-style link.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/automatic-anchors.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n<http://example.com/>";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/automatic-anchors.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p><a href="http://example.com/">http://example.com/</a></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/blockquote-nested-markdown.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "> ## This is a header.\n>\n> 1.   This is the first list item.\n> 2.   This is the second list item.\n>\n> Here's some example code:\n>\n>     return shell_exec(\"echo $input | $markdown_script\");";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/blockquote-nested-markdown.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,13 @@
+<blockquote>
+  <h2 id="thisisaheader">This is a header.</h2>
+  
+  <ol>
+  <li>This is the first list item.</li>
+  <li>This is the second list item.</li>
+  </ol>
+  
+  <p>Here's some example code:</p>
+
+<pre><code>return shell_exec("echo $input | $markdown_script");
+</code></pre>
+</blockquote>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/blockquote.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "  \n  > This is a multi line blockquote test\n  >\n  > With more than one line.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/blockquote.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<blockquote>
+  <p>This is a multi line blockquote test</p>
+  
+  <p>With more than one line.</p>
+</blockquote>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/code-block-html-escape.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThis is some HTML:\n\n    <h1>Heading</h1>";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/code-block-html-escape.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+<p>This is some HTML:</p>
+
+<pre><code>&lt;h1&gt;Heading&lt;/h1&gt;
+</code></pre>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/code-block.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThis is a normal paragraph:\n\n    This is a code block.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/code-block.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+<p>This is a normal paragraph:</p>
+
+<pre><code>This is a code block.
+</code></pre>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/doubline-list.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n *  Bird\n\n *  Magic";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/doubline-list.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+<ul>
+<li><p>Bird</p></li>
+<li><p>Magic</p></li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/emphasis.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n*important*\n\n_important_\n\nthis mid*important*sentence";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/emphasis.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<p><em>important</em></p>
+
+<p><em>important</em></p>
+
+<p>this mid<em>important</em>sentence</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/escaped-number-period.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "It happened in 1986\.  What a great season.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/escaped-number-period.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p>It happened in 1986.  What a great season.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/escaping.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThese should all be escaped:\n\n\\\n\n\`\n\n\*\n\n\_\n\n\{\n\n\}\n\n\[\n\n\]\n\n\(\n\n\)\n\n\#\n\n\+\n\n\-\n\n\.\n\n\!";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/escaping.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,31 @@
+<p>These should all be escaped:</p>
+
+<p>\</p>
+
+<p>`</p>
+
+<p>*</p>
+
+<p>_</p>
+
+<p>{</p>
+
+<p>}</p>
+
+<p>[</p>
+
+<p>]</p>
+
+<p>(</p>
+
+<p>)</p>
+
+<p>#</p>
+
+<p>+</p>
+
+<p>-</p>
+
+<p>.</p>
+
+<p>!</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-at-start.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "```\nfunction MyFunc(a) {\n    // ...\n}\n```\n\nThat is some code!";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-at-start.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,6 @@
+<pre><code>function MyFunc(a) {
+    // ...
+}
+</code></pre>
+
+<p>That is some code!</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-codeblock.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nDefine a function in javascript:\n\n```\nfunction MyFunc(a) {\n    var s = '`';\n}\n```\n\nAnd some HTML\n\n```html\n<div>HTML!</div>\n```";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-codeblock.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,11 @@
+<p>Define a function in javascript:</p>
+
+<pre><code>function MyFunc(a) {
+    var s = '`';
+}
+</code></pre>
+
+<p>And some HTML</p>
+
+<pre><code class="html">&lt;div&gt;HTML!&lt;/div&gt;
+</code></pre>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-linebreaks.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "```\ncode can go here\nthis is rendered on a second line\n```";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/github-style-linebreaks.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,3 @@
+<pre><code>code can go here
+this is rendered on a second line
+</code></pre>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-double-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "# This is an H1 #";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-double-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h1 id="thisisanh1">This is an H1</h1>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-equals.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "This is an H1\n=============";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-equals.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h1 id="thisisanh1">This is an H1</h1>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "# This is an H1";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h1-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h1 id="thisisanh1">This is an H1</h1>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-dashes.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "This is an H2\n-------------";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-dashes.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h2 id="thisisanh2">This is an H2</h2>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-double-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "## This is an H2 ##";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-double-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h2 id="thisisanh2">This is an H2</h2>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "## This is an H2";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h2-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h2 id="thisisanh2">This is an H2</h2>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h3-with-double-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "### This is an H3 ###";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h3-with-double-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h3 id="thisisanh3">This is an H3</h3>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h3-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "### This is an H3";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h3-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h3 id="thisisanh3">This is an H3</h3>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h4-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "#### This is an H4";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h4-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h4 id="thisisanh4">This is an H4</h4>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h5-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "##### This is an H5";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h5-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h5 id="thisisanh5">This is an H5</h5>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h6-with-single-hash.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "###### This is an H6";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/h6-with-single-hash.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<h6 id="thisisanh6">This is an H6</h6>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/horizontal-rules.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n* * *\n\n***\n\n*****\n\n- - -\n\n---------------------------------------\n";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/horizontal-rules.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,9 @@
+<hr />
+
+<hr />
+
+<hr />
+
+<hr />
+
+<hr />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/html5-strutural-tags.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThese HTML5 tags should pass through just fine.\n\n<section>hello</section>\n<header>head</header>\n<footer>footsies</footer>\n<nav>navigation</nav>\n<article>read me</article>\n<aside>ignore me</aside>\n<article>read\nme</article>\n<aside>\nignore me\n</aside>\n\nthe end";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/html5-strutural-tags.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,22 @@
+<p>These HTML5 tags should pass through just fine.</p>
+
+<section>hello</section>
+
+<header>head</header>
+
+<footer>footsies</footer>
+
+<nav>navigation</nav>
+
+<article>read me</article>
+
+<aside>ignore me</aside>
+
+<article>read
+me</article>
+
+<aside>
+ignore me
+</aside>
+
+<p>the end</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/images.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n![Alt text](/path/to/img.jpg)\n\n![Alt text](/path/to/img.jpg \"Optional title\")\n\n![Alt text][id]\n\n  [id]: url/to/image  \"Optional title attribute\"";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/images.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<p><img src="/path/to/img.jpg" alt="Alt text" title="" /></p>
+
+<p><img src="/path/to/img.jpg" alt="Alt text" title="Optional title" /></p>
+
+<p><img src="url/to/image" alt="Alt text" title="Optional title attribute" /></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/implicit-anchors.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nSearch the web at [Google][] or [Daring Fireball][].\n\n  [Google]: http://google.com/\n  [Daring Fireball]: http://daringfireball.net/";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/implicit-anchors.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p>Search the web at <a href="http://google.com/">Google</a> or <a href="http://daringfireball.net/">Daring Fireball</a>.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-anchors.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThis is [an example](http://example.com/ \"Title\") inline link.\n\n[This link](http://example.net/) has no title attribute.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-anchors.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,3 @@
+<p>This is <a href="http://example.com/" title="Title">an example</a> inline link.</p>
+
+<p><a href="http://example.net/">This link</a> has no title attribute.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-code.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nCreate a new `function`.\n\nUse the backtick in MySQL syntax ``SELECT `column` FROM whatever``.\n\nA single backtick in a code span: `` ` ``\n\nA backtick-delimited string in a code span: `` `foo` ``\n\nPlease don't use any `<blink>` tags.\n\n`&#8212;` is the decimal-encoded equivalent of `&mdash;`.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-code.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,11 @@
+<p>Create a new <code>function</code>.</p>
+
+<p>Use the backtick in MySQL syntax <code>SELECT `column` FROM whatever</code>.</p>
+
+<p>A single backtick in a code span: <code>`</code></p>
+
+<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
+
+<p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
+
+<p><code>&amp;#8212;</code> is the decimal-encoded equivalent of <code>&amp;mdash;</code>.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-style-tag.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n<style>\n    p { line-height: 20px; }\n</style>\n\nAn exciting sentence.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/inline-style-tag.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<style>
+    p { line-height: 20px; }
+</style>
+
+<p>An exciting sentence.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/lazy-blockquote.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n  > This is a multi line blockquote test\n\n  > With more than one line.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/lazy-blockquote.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<blockquote>
+  <p>This is a multi line blockquote test</p>
+  
+  <p>With more than one line.</p>
+</blockquote>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/list-with-blockquote.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "*   A list item with a blockquote:\n\n    > This is a blockquote\n    > inside a list item.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/list-with-blockquote.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,8 @@
+<ul>
+<li><p>A list item with a blockquote:</p>
+
+<blockquote>
+  <p>This is a blockquote
+  inside a list item.</p>
+</blockquote></li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/list-with-code.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "*   A list item with code:\n\n        alert('Hello world!');";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/list-with-code.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,6 @@
+<ul>
+<li><p>A list item with code:</p>
+
+<pre><code>alert('Hello world!');
+</code></pre></li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/multi-paragraph-list.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n 1.  This is a major bullet point.\n\n    That contains multiple paragraphs.\n\n 2.  And another line";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/multi-paragraph-list.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,6 @@
+<ol>
+<li><p>This is a major bullet point.</p>
+
+<p>That contains multiple paragraphs.</p></li>
+<li><p>And another line</p></li>
+</ol>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/multiline-unordered-list.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n - This line spans\n more than one line and is lazy\n - Similar to this line";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/multiline-unordered-list.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ul>
+<li>This line spans
+more than one line and is lazy</li>
+<li>Similar to this line</li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/nested-blockquote.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n  > This is a multi line blockquote test\n  >\n  > > And nesting!\n  >\n  > With more than one line.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/nested-blockquote.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,9 @@
+<blockquote>
+  <p>This is a multi line blockquote test</p>
+  
+  <blockquote>
+    <p>And nesting!</p>
+  </blockquote>
+  
+  <p>With more than one line.</p>
+</blockquote>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list-same-number.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n 1.  Red\n 1.  Green\n 1.  Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list-same-number.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ol>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ol>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n 8.  Red\n 1.  Green\n 3.  Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ol>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ol>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n 1.  Red\n 2.  Green\n 3.  Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/ordered-list.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ol>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ol>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/relative-anchors.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nSee my [About](/about/) page for details.";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/relative-anchors.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p>See my <a href="/about/">About</a> page for details.</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/simple-paragraph.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nHello, world!";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/simple-paragraph.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p>Hello, world!</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/strong.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n**important**\n\n__important__\n\nreally **freaking**strong";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/strong.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<p><strong>important</strong></p>
+
+<p><strong>important</strong></p>
+
+<p>really <strong>freaking</strong>strong</p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-basic.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "| First Header  | Second Header |\n| ------------- | ------------- |\n| Row 1 Cell 1  | Row 1 Cell 2  |\n| Row 2 Cell 1  | Row 2 Cell 2  |\n";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-basic.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,21 @@
+<table>
+<thead>
+<tr>
+<th id="first_header" style="text-align:left;"> First Header  </th>
+<th id="second_header" style="text-align:left;"> Second Header </th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+<td style="text-align:left;"><p>Row 1 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 1 Cell 2  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 2 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 2 Cell 2  </p></td>
+</tr>
+
+</tbody>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-large.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "| First Header  | Second Header | Third Header  | Fourth Header |\n| ------------- | ------------- | ------------  | ------------- |\n| Row 1 Cell 1  | Row 1 Cell 2  | Row 1 Cell 3  | Row 1 Cell 4  |\n| Row 2 Cell 1  | Row 2 Cell 2  | Row 2 Cell 3  | Row 2 Cell 4  |\n| Row 3 Cell 1  | Row 3 Cell 2  | Row 3 Cell 3  | Row 3 Cell 4  |\n| Row 4 Cell 1  | Row 4 Cell 2  | Row 4 Cell 3  | Row 4 Cell 4  |\n| Row 5 Cell 1  | Row 5 Cell 2  | Row 5 Cell 3  | Row 5 Cell 4  |\n";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-large.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,48 @@
+<table>
+<thead>
+<tr>
+<th id="first_header" style="text-align:left;"> First Header  </th>
+<th id="second_header" style="text-align:left;"> Second Header </th>
+<th id="third_header" style="text-align:left;"> Third Header  </th>
+<th id="fourth_header" style="text-align:left;"> Fourth Header </th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+<td style="text-align:left;"><p>Row 1 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 1 Cell 2  </p></td>
+<td style="text-align:left;"><p>Row 1 Cell 3  </p></td>
+<td style="text-align:left;"><p>Row 1 Cell 4  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 2 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 2 Cell 2  </p></td>
+<td style="text-align:left;"><p>Row 2 Cell 3  </p></td>
+<td style="text-align:left;"><p>Row 2 Cell 4  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 3 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 3 Cell 2  </p></td>
+<td style="text-align:left;"><p>Row 3 Cell 3  </p></td>
+<td style="text-align:left;"><p>Row 3 Cell 4  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 4 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 4 Cell 2  </p></td>
+<td style="text-align:left;"><p>Row 4 Cell 3  </p></td>
+<td style="text-align:left;"><p>Row 4 Cell 4  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 5 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 5 Cell 2  </p></td>
+<td style="text-align:left;"><p>Row 5 Cell 3  </p></td>
+<td style="text-align:left;"><p>Row 5 Cell 4  </p></td>
+</tr>
+
+</tbody>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-with-equals.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "| First Header  | Second Header |\n| ============= | ============= |\n| Row 1 Cell 1  | Row 1 Cell 2  |\n| Row 2 Cell 1  | Row 2 Cell 2  |\n";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/table-with-equals.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,21 @@
+<table>
+<thead>
+<tr>
+<th id="first_header" style="text-align:left;"> First Header  </th>
+<th id="second_header" style="text-align:left;"> Second Header </th>
+</tr>
+</thead>
+
+<tbody>
+<tr>
+<td style="text-align:left;"><p>Row 1 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 1 Cell 2  </p></td>
+</tr>
+
+<tr>
+<td style="text-align:left;"><p>Row 2 Cell 1  </p></td>
+<td style="text-align:left;"><p>Row 2 Cell 2  </p></td>
+</tr>
+
+</tbody>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-asterisk.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n * Red\n * Green\n * Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-asterisk.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ul>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-minus.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n - Red\n - Green\n - Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-minus.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ul>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-plus.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\n + Red\n + Green\n + Blue";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/unordered-list-plus.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+<ul>
+<li>Red</li>
+<li>Green</li>
+<li>Blue</li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/url-with-parenthesis.js	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test for Showdown markdown parser work with Nashorn.
+ *
+ * @test
+ * @run
+ */
+
+var input = "\nThere's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation";
+var output = converter.makeHtml(input);
+print(output);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/markdown/url-with-parenthesis.js.EXPECTED	Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+<p>There's an <a href="http://en.memory-alpha.org/wiki/Darmok_(episode)">episode</a> of Star Trek: The Next Generation</p>