cmark

My personal build of CMark ✏️

Commit
1caeda5b537c5cd30f4fc2bf078a00265473894c
Parent
be19ec302584732eca18de162a7eaf5d8649379e
Author
John MacFarlane <jgm@berkeley.edu>
Date

Moved spec.txt to test/ directory.

Diffstat

4 files changed, 5 insertions, 5 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 4 2 2
Modified test/CMakeLists.txt 4 2 2
Renamed spec.txt -> test/spec.txt 0 0 0
Modified test/spec_tests.py 2 1 1
diff --git a/Makefile b/Makefile
@@ -4,7 +4,7 @@ BUILDDIR?=build
 GENERATOR?=Unix Makefiles
 MINGW_BUILDDIR?=build-mingw
 MINGW_INSTALLDIR?=windows
-SPEC=spec.txt
+SPEC=test/spec.txt
 SITE=_site
 SPECVERSION=$(shell perl -ne 'print $$1 if /^version: *([0-9.]+)/' $(SPEC))
 FUZZCHARS?=2000000  # for fuzztest
@@ -82,7 +82,7 @@ $(SRCDIR)/scanners.c: $(SRCDIR)/scanners.re
 test: $(SPEC) cmake_build
 	make -C $(BUILDDIR) test || (cat $(BUILDDIR)/Testing/Temporary/LastTest.log && exit 1)
 
-$(ALLTESTS): spec.txt
+$(ALLTESTS): $(SPEC)
 	python3 test/spec_tests.py --spec $< --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@
 
 leakcheck: $(ALLTESTS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
@@ -27,7 +27,7 @@ IF (PYTHONINTERP_FOUND)
 
   add_test(spectest_library
     ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
-    "${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src"
+    "${CMAKE_SOURCE_DIR}/test/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src"
     )
 
   add_test(pathological_tests_library
@@ -36,7 +36,7 @@ IF (PYTHONINTERP_FOUND)
     )
 
   add_test(spectest_executable
-    ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
+    ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/test/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
     )
 
 ELSE(PYTHONINTERP_FOUND)
diff --git a/spec.txt b/test/spec.txt
diff --git a/test/spec_tests.py b/test/spec_tests.py
@@ -13,7 +13,7 @@ if __name__ == "__main__":
     parser = argparse.ArgumentParser(description='Run cmark tests.')
     parser.add_argument('-p', '--program', dest='program', nargs='?', default=None,
             help='program to test')
-    parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt',
+    parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='test/spec.txt',
             help='path to spec')
     parser.add_argument('-P', '--pattern', dest='pattern', nargs='?',
             default=None, help='limit to sections matching regex pattern')