Skip to content

Commit

Permalink
test: Fix ctest failures on Mac and Windows
Browse files Browse the repository at this point in the history
- Mac iconv lacks EBCDIC support
- Unicode path tests missing EOL flag on MSYS
  • Loading branch information
abelcheung committed Nov 24, 2023
1 parent 44c6e9a commit 3838090
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ jobs:
env:
MSYS2_PATH_TYPE: inherit
run: |
cd build && ctest --output-on-failure
cd build && ctest --output-on-failure -V
9 changes: 7 additions & 2 deletions test/cmake/encoding.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ set_tests_properties(
#
# ASCII incompatible encoding
#
add_encoding_test(f_BadEncEBCDIC -DCHOICES=IBM-037|IBM037|CP037 -DINFO2=dummy)
if(APPLE)
# iconv on Mac lacks many encodings
add_encoding_test(f_IncompatEnc -DCHOICES=UTF-32 -DINFO2=dummy)
else()
add_encoding_test(f_IncompatEnc -DCHOICES=IBM-037|IBM037|CP037 -DINFO2=dummy)
endif()
set_tests_properties(
f_BadEncEBCDIC
f_IncompatEnc
PROPERTIES
LABELS "encoding;info2"
PASS_REGULAR_EXPRESSION "possibly be a code page or compatible encoding"
Expand Down
2 changes: 1 addition & 1 deletion test/cmake/read-write.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function(UniInputPathTest testid is_info2 input ref)

add_test(
NAME ${prefix}
COMMAND ${CMAKE_COMMAND} -E compare_files ${out} ${ref_fullpath})
COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${out} ${ref_fullpath})

set_tests_properties(${prefix}_Prep PROPERTIES FIXTURES_SETUP ${fixture})
set_tests_properties(${prefix}_Clean PROPERTIES FIXTURES_CLEANUP ${fixture})
Expand Down

0 comments on commit 3838090

Please sign in to comment.