Fix handling of positional parameters in wxPrintf() and related.
Handle positional parameter specifications in wxFormatConverter to ensure that e.g. "%N$s" are correctly transformed to "%N$S" if needed. This fixes the use of positional parameters under OS X. Closes #10965. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,6 +165,13 @@ void StringTestCase::Format()
|
||||
wxString s(wxT('Z'), len);
|
||||
CPPUNIT_ASSERT_EQUAL( len, wxString::Format(wxT("%s"), s.c_str()).length());
|
||||
}
|
||||
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL
|
||||
(
|
||||
"two one",
|
||||
wxString::Format(wxT("%2$s %1$s"), wxT("one"), wxT("two"))
|
||||
);
|
||||
}
|
||||
|
||||
void StringTestCase::Constructors()
|
||||
|
Reference in New Issue
Block a user