Allow setting locale for the tests
This is especially useful to set an UTF-8 locale on the startup to force using UTF-8-specific code in UTF-8 build.
This commit is contained in:
parent
92649ca2e6
commit
378f3860d2
1 changed files with 7 additions and 0 deletions
|
|
@ -633,6 +633,13 @@ bool TestApp::OnInit()
|
|||
cout << " as " << wxGetUserId()
|
||||
<< std::endl;
|
||||
|
||||
// Optionally allow executing the tests in the locale specified by the
|
||||
// standard environment variable, this is especially useful to use UTF-8
|
||||
// for all tests by just setting WX_TEST_LOCALE=C.
|
||||
wxString testLoc;
|
||||
if ( wxGetEnv(wxASCII_STR("WX_TEST_LOCALE"), &testLoc) )
|
||||
wxSetlocale(LC_ALL, testLoc);
|
||||
|
||||
#if wxUSE_GUI
|
||||
// create a parent window to be used as parent for the GUI controls
|
||||
new wxTestableFrame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue