Moved locale validation to a compile time test, instead of a runtime check performed by MSE itself.

This also removes perl as a build dependency for people who don't want to run the test suite.
This commit is contained in:
Twan van Laarhoven
2020-04-18 19:08:35 +02:00
parent 0d38c64e86
commit 60c392a068
7 changed files with 232 additions and 189 deletions
+17
View File
@@ -0,0 +1,17 @@
# Use CTest for tests
enable_testing()
set(test_dir "${PROJECT_SOURCE_DIR}/test")
set(CTEST_OUTPUT_ON_FAILURE 1)
# Validate locales
file(GLOB locales data/*.mse-locale)
add_test(
NAME "validate-locales"
COMMAND perl "${test_dir}/locale/validate_locale.pl" "${PROJECT_SOURCE_DIR}/src" ${locales}
)
# Scripting language tests
# TODO
# Rendering tests
# TODO