From 515e823051533a91cae322536e6926eea4c48113 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 14 Feb 2015 18:10:32 -0800 Subject: Added test for --smart option. Currently one test fails. --- test/CMakeLists.txt | 4 ++++ test/smart_punct.txt | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 test/smart_punct.txt 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." +. +

“Hello,” said the spider. +“‘Shelob’ is my name.”

+. + +. +'A', 'B', and 'C' are letters. +. +

‘A’, ‘B’, and ‘C’ are letters.

+. + +. +'Oak,' 'elm,' and 'beech' are names of trees. +So is 'pine.' +. +

‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. +So is ‘pine.’

+. + +. +'He said, "I want to go."' +. +

‘He said, “I want to go.”’

+. + +. +Were you alive in the 70's? +. +

Were you alive in the 70’s?

+. + +. +Here is some quoted '`code`' and a "[quoted link][1]". +. +

Here is some quoted ‘code’ and a “[quoted link][1]”.

+. + +. +Some dashes: one---two --- +three---four --- five. +. +

Some dashes: one—two — +three—four — five.

+. + +. +Dashes between numbers: 5--7, 255--66, 1987--1999. +. +

Dashes between numbers: 5–7, 255–66, 1987–1999.

+. + +. +Ellipses...and...and.... +. +

Ellipses…and…and….

+. -- cgit v1.2.3