Corrected formatting of archiver command in the tests.

wxString::Format() was used even when the first argument didn't contain
any %s, yet a string argument was always passed to it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2010-06-24 10:33:36 +00:00
parent 155362949b
commit 72e7920f2d

View File

@ -1381,11 +1381,17 @@ string ArchiveTestSuite::Description(const wxString& type,
if (!archiver.empty()) {
const wxChar *fn = (options & PipeOut) != 0 ? wxT("-") : wxT("file");
descr << wxT(" (") << wxString::Format(archiver, fn) << wxT(")");
const wxString cmd = archiver.Contains("%s")
? wxString::Format(archiver, fn)
: archiver;
descr << wxT(" (") << cmd << wxT(")");
}
if (!unarchiver.empty()) {
const wxChar *fn = (options & PipeIn) != 0 ? wxT("-") : wxT("file");
descr << wxT(" (") << wxString::Format(unarchiver, fn) << wxT(")");
const wxString cmd = unarchiver.Contains("%s")
? wxString::Format(unarchiver, fn)
: unarchiver;
descr << wxT(" (") << cmd << wxT(")");
}
wxString optstr;