Add testframework and start bash completion. Not functional yet

This commit is contained in:
2025-05-10 22:57:05 +02:00
parent 29fdc841b7
commit b49ae6e46c
5 changed files with 26 additions and 0 deletions

11
test/CMakeLists.txt Normal file
View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(patchelfcrc-test LANGUAGES CXX C)
add_subdirectory(catch2 EXCLUDE_FROM_ALL)
add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME})
aux_source_directory("src" TEST_SOURCES)
set(DUT_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../src/crc.c)
add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL ${TEST_SOURCES} ${DUT_SOURCES})
target_link_libraries(${PROJECT_NAME} PRIVATE Catch2::Catch2WithMain)

1
test/catch2 Submodule

Submodule test/catch2 added at 0631b607ee