# HG changeset patch
# User sundar
# Date 1386855163 -19800
# Node ID 550f881d43ba01b27edc805400f8097472b44657
# Parent dcca148a8219b401e154a0582a6daac744619886
8027958: NASHORN TEST: Create tests to test markdown javascript engine work with Nashorn
Summary: markdown test fix contributed by kshefov
Reviewed-by: jlaskey
diff -r dcca148a8219 -r 550f881d43ba make/build.xml
--- a/make/build.xml Mon Dec 02 18:19:26 2013 +0530
+++ b/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";
+};
+
\/
@@ -319,6 +323,7 @@
+
@@ -399,6 +404,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -546,6 +570,11 @@
+
+
+
+
+
diff -r dcca148a8219 -r 550f881d43ba make/project.properties
--- a/make/project.properties Mon Dec 02 18:19:26 2013 +0530
+++ b/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}
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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']});
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/anchors-by-reference.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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]: \n \"Optional Title Here\"";
+var output = converter.makeHtml(input);
+print(output);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/anchors-by-reference.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/anchors-by-reference.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+
This is an example reference-style link.
+This is another reference-style link.
+This is a third reference-style link.
+This is a fourth reference-style link.
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/automatic-anchors.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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";
+var output = converter.makeHtml(input);
+print(output);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/automatic-anchors.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/automatic-anchors.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/blockquote-nested-markdown.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/blockquote-nested-markdown.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/blockquote-nested-markdown.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,13 @@
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/blockquote.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/blockquote.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/blockquote.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+
+
This is a multi line blockquote test
+
+
With more than one line.
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/code-block-html-escape.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/code-block.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/code-block.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/code-block.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+
This is a normal paragraph:
+
+
This is a code block.
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/doubline-list.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/doubline-list.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/doubline-list.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,4 @@
+
+
Bird
+
Magic
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/emphasis.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/emphasis.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/emphasis.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+
important
+
+
important
+
+
this midimportantsentence
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/escaped-number-period.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/escaped-number-period.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/escaped-number-period.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
It happened in 1986. What a great season.
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/escaping.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/escaping.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/escaping.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,31 @@
+
These should all be escaped:
+
+
\
+
+
`
+
+
*
+
+
_
+
+
{
+
+
}
+
+
[
+
+
]
+
+
(
+
+
)
+
+
#
+
+
+
+
+
-
+
+
.
+
+
!
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/github-style-at-start.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/github-style-at-start.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/github-style-at-start.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,6 @@
+
function MyFunc(a) {
+ // ...
+}
+
+
+
That is some code!
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/github-style-codeblock.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/github-style-linebreaks.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/github-style-linebreaks.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/github-style-linebreaks.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,3 @@
+
code can go here
+this is rendered on a second line
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-double-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-double-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h1-with-double-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H1
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-equals.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-equals.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h1-with-equals.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H1
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h1-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h1-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H1
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-dashes.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-dashes.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h2-with-dashes.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H2
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-double-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-double-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h2-with-double-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H2
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h2-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h2-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H2
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h3-with-double-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h3-with-double-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h3-with-double-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H3
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h3-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h3-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h3-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H3
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h4-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h4-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h4-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H4
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h5-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h5-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h5-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H5
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h6-with-single-hash.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/h6-with-single-hash.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/h6-with-single-hash.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
This is an H6
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/horizontal-rules.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/horizontal-rules.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/horizontal-rules.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/html5-strutural-tags.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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\nhello\nhead\n\n\nread me\n\nread\nme\n\n\nthe end";
+var output = converter.makeHtml(input);
+print(output);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/html5-strutural-tags.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/html5-strutural-tags.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,22 @@
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/images.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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\n\n\n\n![Alt text][id]\n\n [id]: url/to/image \"Optional title attribute\"";
+var output = converter.makeHtml(input);
+print(output);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/images.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/images.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/implicit-anchors.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/implicit-anchors.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/implicit-anchors.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,1 @@
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/inline-anchors.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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);
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/inline-anchors.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/markdown/inline-anchors.js.EXPECTED Thu Dec 12 19:02:43 2013 +0530
@@ -0,0 +1,3 @@
+
diff -r dcca148a8219 -r 550f881d43ba test/script/markdown/inline-code.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/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 `