From 72e7920f2d64f024246a65a7aee78a2671824cf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 24 Jun 2010 10:33:36 +0000 Subject: [PATCH] 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 --- tests/archive/archivetest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.50.0