mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
Tests: Update expected Zstandard magic number for libarchive 3.8.2
libarchive 3.8.2 enabled Zstandard's checksum feature in the zstd write filter. Update our tests' expected results accordingly. Fixes: #27355 Reported-by: Funda Wang <fundawang@yeah.net>
This commit is contained in:
@@ -7,4 +7,5 @@ set(DECOMPRESSION_FLAGS xvf)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
|
||||
|
||||
check_magic("28b52ffd0058" LIMIT 6 HEX)
|
||||
# libarchive 3.8.2 enables a checksum feature; older versions do not.
|
||||
check_magic("^28b52ffd0[04]58$" LIMIT 6 HEX)
|
||||
|
||||
@@ -86,6 +86,10 @@ function(check_magic EXPECTED)
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(EXPECTED MATCHES "[^0-9a-f]" AND ACTUAL MATCHES "${EXPECTED}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT ACTUAL STREQUAL EXPECTED)
|
||||
message(FATAL_ERROR
|
||||
"Actual [${ACTUAL}] does not match expected [${EXPECTED}]")
|
||||
|
||||
@@ -5,4 +5,5 @@ set(COMPRESSION_TYPE Zstd)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
|
||||
|
||||
check_magic("28b52ffd0058" LIMIT 6 HEX)
|
||||
# libarchive 3.8.2 enables a checksum feature; older versions do not.
|
||||
check_magic("^28b52ffd0[04]58$" LIMIT 6 HEX)
|
||||
|
||||
@@ -86,6 +86,10 @@ function(check_magic EXPECTED)
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(EXPECTED MATCHES "[^0-9a-f]" AND ACTUAL MATCHES "${EXPECTED}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT ACTUAL STREQUAL EXPECTED)
|
||||
message(FATAL_ERROR
|
||||
"Actual [${ACTUAL}] does not match expected [${EXPECTED}]")
|
||||
|
||||
Reference in New Issue
Block a user