[client] keybind: test built-in actions and ordering

This commit is contained in:
Geoffrey McRae
2026-08-12 04:43:19 +10:00
parent fc7c8e9cae
commit eb8b46eac9
2 changed files with 505 additions and 0 deletions

View File

@@ -293,6 +293,37 @@ foreach(name IN LISTS INPUT_CASES)
)
endforeach()
add_executable(keybind-tests
keybind_test.c
)
target_compile_definitions(keybind-tests PRIVATE
CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1
)
target_include_directories(keybind-tests PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../src"
"${PROJECT_TOP}/repos/gui/cimgui"
"${PROJECT_TOP}/repos/gui/cimgui/imgui"
)
target_link_libraries(keybind-tests
${EXE_FLAGS}
lg_common
)
set(KEYBIND_CASES
common
os
order
repeat
actions
)
foreach(name IN LISTS KEYBIND_CASES)
add_test(NAME keybind-${name}
COMMAND keybind-tests ${name}
)
set_tests_properties(keybind-${name} PROPERTIES
TIMEOUT 10
)
endforeach()
add_executable(clipboard-tests
clipboard_test.c
../src/clipboard.c