summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-24 21:13:50 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-24 21:13:50 -0800
commit1caeda5b537c5cd30f4fc2bf078a00265473894c (patch)
tree0d88f3230f5703dd002b307d4715d7ad7b41a67e
parentbe19ec302584732eca18de162a7eaf5d8649379e (diff)
Moved spec.txt to test/ directory.
-rw-r--r--Makefile4
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/spec.txt (renamed from spec.txt)0
-rwxr-xr-xtest/spec_tests.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 62b0023..f7a9335 100644
--- 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
index 11a27c6..0fba1b3 100644
--- 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
index e754810..e754810 100644
--- a/spec.txt
+++ b/test/spec.txt
diff --git a/test/spec_tests.py b/test/spec_tests.py
index cc676be..b1b0373 100755
--- 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')