Test SVG and desktop file validity

This commit is contained in:
Přemysl Eric Janouch 2023-06-15 16:21:18 +02:00
parent 74d9acecb5
commit 951208c15b
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 10 additions and 4 deletions

View File

@ -380,14 +380,12 @@ endif ()
# Do some unit tests
option (BUILD_TESTING "Build tests" OFF)
set (project_tests stardict)
enable_testing ()
find_program (xmlwf_EXECUTABLE xmlwf)
find_program (xmllint_EXECUTABLE xmllint)
foreach (xml ${PROJECT_NAME}.xml)
foreach (xml ${PROJECT_NAME}.xml ${PROJECT_NAME}.svg)
if (xmlwf_EXECUTABLE)
add_test (test-xmlwf-${xml} ${xmlwf_EXECUTABLE}
@ -398,7 +396,15 @@ if (BUILD_TESTING)
endif ()
endforeach ()
foreach (name ${project_tests})
find_program (dfv_EXECUTABLE desktop-file-validate)
foreach (df ${PROJECT_NAME}.desktop)
add_test (test-dfv-${df} ${dfv_EXECUTABLE}
endforeach ()
endif ()
foreach (name stardict)
add_executable (test-${name}
src/test-${name}.c ${project_common_sources})
target_link_libraries (test-${name} ${project_common_libraries})