diff options
author | Carlo Teubner <carlo@cteubner.net> | 2022-04-03 22:36:17 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2022-10-02 15:30:35 +0300 |
commit | bb4f5c2e9427da591504cebeae8ecbb54c1da655 (patch) | |
tree | 6ce8bf9ee8d75c3cb85ccc3f04e32e6c5adf064d | |
parent | eaa363d8c032fc5513d4566d72f249a6e4e9d293 (diff) |
Run tests with LANG=en_US.UTF-8
On my system, I have LANG=en_GB set, which causes the following test
failure:
FAIL! : TestCli::testInfo() Compared values are not the same
Actual (m_stdout->readLine()) : "Average password length: 11 character(s)\n"
Expected (QByteArray("Average password length: 11 characters\n")): "Average password length: 11 characters\n"
Loc: [tests/TestCli.cpp(876)]
And it so happens that the en_GB translation of that string has
'character(s)' where en_US has 'characters'.
-rw-r--r-- | tests/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 325ff880e..776c40d98 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -75,6 +75,8 @@ macro(add_unit_test) add_test(${_test_NAME} ${_test_LAUNCHER} ${_test_NAME}) endif(KDE4_TEST_OUTPUT STREQUAL "xml") + set_tests_properties(${_test_NAME} PROPERTIES ENVIRONMENT "LANG=en_US.UTF-8") + if(NOT MSVC_IDE) #not needed for the ide # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests if(NOT WITH_TESTS) |