summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-02-14 18:10:32 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-02-14 18:10:43 -0800
commit515e823051533a91cae322536e6926eea4c48113 (patch)
tree3e76cb06c20c46d8f9c92995d0ea90706cbe5f1d /test
parentbb26b18173df983c57459809e8b1691b89907a58 (diff)
Added test for --smart option.
Currently one test fails.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/smart_punct.txt61
2 files changed, 65 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0fba1b3..6d752ca 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -39,6 +39,10 @@ IF (PYTHONINTERP_FOUND)
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/test/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
)
+ add_test(smartpuncttest_executable
+ ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/test/smart_punct.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark --smart"
+ )
+
ELSE(PYTHONINTERP_FOUND)
message("\n*** A python 3 interpreter is required to run the spec tests.\n")
diff --git a/test/smart_punct.txt b/test/smart_punct.txt
new file mode 100644
index 0000000..c036a6d
--- /dev/null
+++ b/test/smart_punct.txt
@@ -0,0 +1,61 @@
+## Smart punctuation
+
+.
+"Hello," said the spider.
+"'Shelob' is my name."
+.
+<p>&ldquo;Hello,&rdquo; said the spider.
+&ldquo;&lsquo;Shelob&rsquo; is my name.&rdquo;</p>
+.
+
+.
+'A', 'B', and 'C' are letters.
+.
+<p>&lsquo;A&rsquo;, &lsquo;B&rsquo;, and &lsquo;C&rsquo; are letters.</p>
+.
+
+.
+'Oak,' 'elm,' and 'beech' are names of trees.
+So is 'pine.'
+.
+<p>&lsquo;Oak,&rsquo; &lsquo;elm,&rsquo; and &lsquo;beech&rsquo; are names of trees.
+So is &lsquo;pine.&rsquo;</p>
+.
+
+.
+'He said, "I want to go."'
+.
+<p>&lsquo;He said, &ldquo;I want to go.&rdquo;&rsquo;</p>
+.
+
+.
+Were you alive in the 70's?
+.
+<p>Were you alive in the 70&rsquo;s?</p>
+.
+
+.
+Here is some quoted '`code`' and a "[quoted link][1]".
+.
+<p>Here is some quoted &lsquo;<code>code</code>&rsquo; and a &ldquo;[quoted link][1]&rdquo;.</p>
+.
+
+.
+Some dashes: one---two ---
+three---four --- five.
+.
+<p>Some dashes: one&mdash;two &mdash;
+three&mdash;four &mdash; five.</p>
+.
+
+.
+Dashes between numbers: 5--7, 255--66, 1987--1999.
+.
+<p>Dashes between numbers: 5&ndash;7, 255&ndash;66, 1987&ndash;1999.</p>
+.
+
+.
+Ellipses...and...and....
+.
+<p>Ellipses&hellip;and&hellip;and&hellip;.</p>
+.