From 64e1394ae76409f02b00c254f119a64a2d1ce11e Mon Sep 17 00:00:00 2001 From: Yuki Izumi Date: Sat, 5 Nov 2016 09:04:48 +1100 Subject: Fix for non-matching entities (#161) * Add test to illustrate issue * Provide some test fixes * Don't neglect CounterClockwiseContourIntegral * Fix ~10% of cases not matching strncmp returns 0 if the first 'len' bytes of cmark_entities[i].entity match s; we check equal length in the first if by checking if cmark_entities[i].entity[len] == 0, but we neglect the case where cmp == 0 && cmark_entities[i].entity[len] != 0. This should be treated as the same as cmp < 0, because strcmp("abc", "abcd") < 0. * Don't depend on py3.3 in tests --- test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3b23cff..2a597ab 100755 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -60,6 +60,10 @@ IF (PYTHONINTERP_FOUND) "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark" ) + add_test(entity_executable + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py" + "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" + ) ELSE(PYTHONINTERP_FOUND) -- cgit v1.2.3