1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

Tests: Test LibMarkdown against commonmark test suite

TestCommonmark runs the CommonMark test suite
(https://spec.commonmark.org/0.30/spec.json) against LibMarkdown.
Currently 44/652 tests pass.
This commit is contained in:
Peter Elliott 2021-08-29 13:19:12 -07:00 committed by Andreas Kling
parent 57ec19f963
commit 8d2c04821f
6 changed files with 71 additions and 1 deletions

View file

@ -0,0 +1,9 @@
option(ENABLE_COMMONMARK_SPEC_DOWNLOAD "Enable download of commonmark test suite at build time" ON)
set(MARKDOWN_TEST_PATH ${CMAKE_BINARY_DIR}/commonmark.spec.json)
set(MARKDOWN_TEST_URL https://spec.commonmark.org/0.30/spec.json)
if(ENABLE_COMMONMARK_SPEC_DOWNLOAD)
file(DOWNLOAD ${MARKDOWN_TEST_URL} ${MARKDOWN_TEST_PATH})
install(FILES ${MARKDOWN_TEST_PATH} DESTINATION home/anon)
endif()

View file

@ -518,6 +518,14 @@ if (BUILD_LAGOM)
)
set_tests_properties(JS PROPERTIES ENVIRONMENT SERENITY_SOURCE_DIR=${SERENITY_PROJECT_ROOT})
# Markdown
include(${SERENITY_PROJECT_ROOT}/Meta/CMake/commonmark_spec.cmake)
file(GLOB LIBMARKDOWN_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibMarkdown/*.cpp")
foreach(source ${LIBMARKDOWN_TEST_SOURCES})
lagom_test(${source} LIBS LagomMarkdown)
endforeach()
set_tests_properties(TestCommonmark PROPERTIES DISABLED YES)
# test-wasm
add_executable(test-wasm_lagom
../../Tests/LibWasm/test-wasm.cpp