CMake style adjustment
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
${LIBRARIES_STATIC_LIBRARIES} ${TERMINFO_STATIC_LIBRARIES})
|
||||
|
||||
include(CTest)
|
||||
if(BUILD_TESTING)
|
||||
if (BUILD_TESTING)
|
||||
add_test(
|
||||
NAME fixture
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
file(REMOVE "${OUTPUT}")
|
||||
|
||||
if(DROP_SHORT)
|
||||
if (DROP_SHORT)
|
||||
set(options --drop-short)
|
||||
set(expected "2 frames, 0.05 s")
|
||||
else()
|
||||
@@ -13,21 +13,21 @@ execute_process(
|
||||
OUTPUT_VARIABLE stdout
|
||||
ERROR_VARIABLE stderr
|
||||
)
|
||||
if(NOT result EQUAL 0)
|
||||
if (NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "player failed (${result}): ${stderr}")
|
||||
endif()
|
||||
if(NOT stdout MATCHES "${expected}")
|
||||
if (NOT stdout MATCHES "${expected}")
|
||||
message(FATAL_ERROR "unexpected player summary: ${stdout}")
|
||||
endif()
|
||||
|
||||
file(SIZE "${OUTPUT}" size)
|
||||
if(size LESS 12)
|
||||
if (size LESS 12)
|
||||
message(FATAL_ERROR "fixture WebP is unexpectedly small (${size} bytes)")
|
||||
endif()
|
||||
|
||||
file(READ "${OUTPUT}" signature LIMIT 12 HEX)
|
||||
string(SUBSTRING "${signature}" 0 8 riff)
|
||||
string(SUBSTRING "${signature}" 16 8 webp)
|
||||
if(NOT riff STREQUAL "52494646" OR NOT webp STREQUAL "57454250")
|
||||
if (NOT riff STREQUAL "52494646" OR NOT webp STREQUAL "57454250")
|
||||
message(FATAL_ERROR "fixture output is not a RIFF/WebP file")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user