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 <Andreas-Schniertshauer@users.noreply.github.com>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
This commit is contained in:
Andreas-Schniertshauer 2020-03-28 15:31:27 +01:00 committed by GitHub
parent 6fff5f32bb
commit 864f7f7b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

4
.gitignore vendored
View File

@ -28,3 +28,7 @@ test/iterate
test/case
test/custom
/tmp/
mingw_static
mingw_shared
msvc_shared
msvc_static

View File

@ -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()