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'.
This commit is contained in:
Carlo Teubner 2022-04-03 20:36:17 +01:00 committed by Jonathan White
parent eaa363d8c0
commit bb4f5c2e94

View File

@ -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)