Rewrite FindFirstFile/FindNextFile (again), add comprehensive tests

This commit is contained in:
2025-10-06 17:56:42 -06:00
parent f5aa320800
commit f366e77956
5 changed files with 790 additions and 175 deletions

View File

@@ -221,6 +221,17 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/test/test_handleapi.c
${CMAKE_CURRENT_SOURCE_DIR}/test/test_assert.h)
add_custom_command(
OUTPUT ${WIBO_TEST_BIN_DIR}/test_findfile.exe
COMMAND ${WIBO_MINGW_CC} -Wall -Wextra -O2
-I${CMAKE_CURRENT_SOURCE_DIR}/test
-o test_findfile.exe
${CMAKE_CURRENT_SOURCE_DIR}/test/test_findfile.c
WORKING_DIRECTORY ${WIBO_TEST_BIN_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/test/test_findfile.c
${CMAKE_CURRENT_SOURCE_DIR}/test/test_assert.h)
add_custom_command(
OUTPUT ${WIBO_TEST_BIN_DIR}/test_synchapi.exe
COMMAND ${WIBO_MINGW_CC} -Wall -Wextra -O2
@@ -376,6 +387,7 @@ if(BUILD_TESTING)
${WIBO_TEST_BIN_DIR}/test_resources.exe
${WIBO_TEST_BIN_DIR}/test_threading.exe
${WIBO_TEST_BIN_DIR}/test_handleapi.exe
${WIBO_TEST_BIN_DIR}/test_findfile.exe
${WIBO_TEST_BIN_DIR}/test_synchapi.exe
${WIBO_TEST_BIN_DIR}/test_processes.exe
${WIBO_TEST_BIN_DIR}/test_heap.exe
@@ -430,6 +442,12 @@ if(BUILD_TESTING)
WORKING_DIRECTORY ${WIBO_TEST_BIN_DIR}
DEPENDS wibo.build_fixtures)
add_test(NAME wibo.test_findfile
COMMAND $<TARGET_FILE:wibo> ${WIBO_TEST_BIN_DIR}/test_findfile.exe)
set_tests_properties(wibo.test_findfile PROPERTIES
WORKING_DIRECTORY ${WIBO_TEST_BIN_DIR}
DEPENDS wibo.build_fixtures)
add_test(NAME wibo.test_synchapi
COMMAND $<TARGET_FILE:wibo> ${WIBO_TEST_BIN_DIR}/test_synchapi.exe)
set_tests_properties(wibo.test_synchapi PROPERTIES