File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 5555 if : matrix.os != 'windows-latest'
5656
5757 - name : Install vcpkg ports (Windows) --triplet "${{ runner.arch }}-${{ runner.os }}"
58- run : ./vcpkg/vcpkg install --classic $(jq '.dependencies[] | select(type == "string")' vcpkg.json)
58+ run : ./vcpkg/vcpkg install --classic $(jq -r '.dependencies[] | select(type == "string")' vcpkg.json)
5959 if : matrix.os == 'windows-latest' && steps.cache-vcpkg.outputs.cache-hit != 'true'
6060
6161 - name : Install vcpkg ports (macOS, Linux)
Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ int sha512_file(const char *filename,
235235#define LIBACQUIRE_SHA256_IMPL
236236bool sha256 (const char * filename , const char * hash ) {
237237 unsigned char sha_output [SHA256_DIGEST_LENGTH * 2 + 1 ];
238- sha256_file (filename , sha_output );
238+ if (sha256_file (filename , sha_output ) != 0 )
239+ return false;
239240
240241 return strcmp ((const char * )sha_output , hash ) == 0 ;
241242}
@@ -245,7 +246,8 @@ bool sha256(const char *filename, const char *hash) {
245246#define LIBACQUIRE_SHA512_IMPL
246247bool sha512 (const char * filename , const char * hash ) {
247248 unsigned char sha_output [SHA512_DIGEST_LENGTH * 2 + 1 ];
248- sha512_file (filename , sha_output );
249+ if (sha512_file (filename , sha_output ) != 0 )
250+ return false;
249251
250252 return strcmp ((const char * )sha_output , hash ) == 0 ;
251253}
Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ foreach (EXEC_NAME ${_targets})
133133 if (LIBACQUIRE_USE_MINIZ)
134134 find_package (kubazip CONFIG REQUIRED)
135135 target_link_libraries ("${EXEC_NAME} " PRIVATE kubazip::kubazip)
136- message (STATUS "LINKING zip here" )
137136 endif (LIBACQUIRE_USE_MINIZ)
138137
139138 target_include_directories (
@@ -174,7 +173,6 @@ foreach (ARCHIVE_LIB ${_archives})
174173
175174 find_package (kubazip CONFIG REQUIRED)
176175 target_link_libraries ("${EXEC_NAME} " PRIVATE kubazip::kubazip)
177- message (STATUS "LINKING zip" )
178176 elseif (LIBACQUIRE_USE_LIBARCHIVE)
179177 set_source_files_properties ("test_extract.c"
180178 PROPERTIES COMPILE_DEFINITIONS "LIBACQUIRE_IMPLEMENTATION=1;LIBACQUIRE_USE_LIBARCHIVE=1" )
Original file line number Diff line number Diff line change @@ -47,12 +47,8 @@ TEST x_test_extract_archive(void) {
4747 EXIT_SUCCESS );
4848
4949 /* Could add a comprehensive file check here */
50- ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "readme.md" ));
51- ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "miniz.h" ));
52- ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "miniz.c" ));
53- ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "ChangeLog.md" ));
54- ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "LICENSE" ));
55- ASSERT_FALSE (!is_directory (EXTRACT_DIR PATH_SEP "examples" ));
50+ ASSERT_FALSE (!is_file (EXTRACT_DIR PATH_SEP "greatest.h" ));
51+ ASSERT_FALSE (!is_directory (EXTRACT_DIR ));
5652
5753#undef EXTRACT_DIR
5854 PASS ();
You can’t perform that action at this time.
0 commit comments