From: Václav Slavík Date: Thu, 24 Jun 2010 10:33:36 +0000 (+0000) Subject: Corrected formatting of archiver command in the tests. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/72e7920f2d64f024246a65a7aee78a2671824cf0 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 --- diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp index aa843b4e8c..04fdb902a2 100644 --- a/tests/archive/archivetest.cpp +++ b/tests/archive/archivetest.cpp @@ -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;