Skip to content

Commit

Permalink
build: reflow some text to match CMake documentation style
Browse files Browse the repository at this point in the history
Match the style as recommended by CMake documentation in [1]. This makes
it easier to read the command being invoked when running tests.  No
functional change.

[1] https://cmake.org/cmake/help/latest/command/add_test.html
  • Loading branch information
compnerd authored and jgm committed Dec 27, 2023
1 parent b3efa6c commit 5085d8c
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,47 @@ endif()

IF (Python3_Interpreter_FOUND)

add_test(NAME html_normalization COMMAND
"$<TARGET_FILE:Python3::Interpreter>" -m doctest "${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
)
add_test(NAME html_normalization
COMMAND "$<TARGET_FILE:Python3::Interpreter>" -m doctest "${CMAKE_CURRENT_SOURCE_DIR}/normalize.py")

if (CMARK_SHARED)
add_test(NAME spectest_library COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" --no-normalize --spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" --library-dir "$<TARGET_FILE_DIR:cmark>"
)
add_test(NAME spectest_library
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py"
--no-normalize
--spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt"
--library-dir "$<TARGET_FILE_DIR:cmark>")

add_test(NAME pathological_tests_library COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py" --library-dir "$<TARGET_FILE_DIR:cmark>"
)
add_test(NAME pathological_tests_library
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
--library-dir "$<TARGET_FILE_DIR:cmark>")

add_test(NAME roundtriptest_library COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py" --spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" --library-dir "$<TARGET_FILE_DIR:cmark>"
)
add_test(NAME roundtriptest_library
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py"
--spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt"
--library-dir "$<TARGET_FILE_DIR:cmark>")

add_test(NAME entity_library COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py" --library-dir "$<TARGET_FILE_DIR:cmark>"
)
add_test(NAME entity_library
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py"
--library-dir "$<TARGET_FILE_DIR:cmark>")
endif()

add_test(NAME spectest_executable COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" --no-normalize --spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" --program "$<TARGET_FILE:cmark_exe>"
)
add_test(NAME spectest_executable
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py"
--no-normalize
--spec "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt"
--program "$<TARGET_FILE:cmark_exe>")

add_test(NAME smartpuncttest_executable COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" --no-normalize --spec "${CMAKE_CURRENT_SOURCE_DIR}/smart_punct.txt" --program "$<TARGET_FILE:cmark_exe> --smart"
)
add_test(NAME smartpuncttest_executable
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py"
--no-normalize
--spec "${CMAKE_CURRENT_SOURCE_DIR}/smart_punct.txt"
--program "$<TARGET_FILE:cmark_exe> --smart")

add_test(NAME regressiontest_executable COMMAND
"$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" --no-normalize --spec "${CMAKE_CURRENT_SOURCE_DIR}/regression.txt" --program "$<TARGET_FILE:cmark_exe>"
)
add_test(NAME regressiontest_executable
COMMAND "$<TARGET_FILE:Python3::Interpreter>" "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py"
--no-normalize
--spec "${CMAKE_CURRENT_SOURCE_DIR}/regression.txt"
--program "$<TARGET_FILE:cmark_exe>")

ELSE(Python3_Interpreter_FOUND)

Expand Down

0 comments on commit 5085d8c

Please sign in to comment.