From 864f7f7b46479733ea9229910f5b27d6019f04ee Mon Sep 17 00:00:00 2001 From: Andreas-Schniertshauer <59561559+Andreas-Schniertshauer@users.noreply.github.com> Date: Sat, 28 Mar 2020 15:31:27 +0100 Subject: [PATCH] Tests with prefix utf8proc. (#177) * Add: tests to CMakeLists.txt * Disable compilation of charwidth, graphemetest and normtest because of missing getline * Refactoring: UTF8PROC_ENABLE_TESTING default Off, move tests that don't compile on windows to NOT MSVC section, add testing to appveyor.yml * Add: testing to travis * Changed: flag to WIN32 because MinGW has the same problem as MSVC * Commented out graphemetest and normtest because they fail. * Re-added: graphemetest and normtest added missing data to the path of the text files. * Fix: last commit was party wrong normtest failed. * * Commented out graphemetest and normtest because they fail, because in CMakeLists is missing building of data. * Add: mingw_static, mingw_shared, msvc_shared, msvc_static to ignore list * Add: prefix utf8proc. to tests * Add: prefix utf8proc. to tests Co-authored-by: Andreas-Schniertshauer Co-authored-by: Steven G. Johnson --- .gitignore | 4 ++++ CMakeLists.txt | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ffd2eda..9364ec4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ test/iterate test/case test/custom /tmp/ +mingw_static +mingw_shared +msvc_shared +msvc_static diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ed9716..f5406fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,22 +75,23 @@ if(UTF8PROC_ENABLE_TESTING) target_link_libraries(printproperty utf8proc) add_executable(valid test/tests.h test/tests.c utf8proc.h test/valid.c) target_link_libraries(valid utf8proc) - add_test(testcase case) - add_test(testcustom custom) - add_test(testiterate iterate) - add_test(testmisc misc) - add_test(testprintproperty printproperty) - add_test(testvalid valid) + add_test(utf8proc.testcase case) + add_test(utf8proc.testcustom custom) + add_test(utf8proc.testiterate iterate) + add_test(utf8proc.testmisc misc) + add_test(utf8proc.testprintproperty printproperty) + add_test(utf8proc.testvalid valid) + if (NOT WIN32) # no wcwidth function on Windows add_executable(charwidth test/tests.h test/tests.c utf8proc.h test/charwidth.c) target_link_libraries(charwidth utf8proc) - add_test(testcharwidth charwidth) + add_test(utf8proc.testcharwidth charwidth) endif() add_executable(graphemetest test/tests.h test/tests.c utf8proc.h test/graphemetest.c) target_link_libraries(graphemetest utf8proc) add_executable(normtest test/tests.h test/tests.c utf8proc.h test/normtest.c) target_link_libraries(normtest utf8proc) - #add_test(testgraphemetest graphemetest data/GraphemeBreakTest.txt) - #add_test(testnormtest normtest data/NormalizationTest.txt) + #add_test(utf8proc.testgraphemetest graphemetest data/GraphemeBreakTest.txt) + #add_test(utf8proc.testnormtest normtest data/NormalizationTest.txt) endif()