summaryrefslogtreecommitdiffstats
path: root/Source/ctest.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-09-20 20:43:51 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-09-20 20:43:51 (GMT)
commit7d09ca52f15f9085d405aadcb253ec0392e35fde (patch)
tree78600439e40e80f7eaae725d4fd270b6d621c759 /Source/ctest.cxx
parentb341539bc1b669431bc89902de202233408ad85f (diff)
downloadCMake-7d09ca52f15f9085d405aadcb253ec0392e35fde.zip
CMake-7d09ca52f15f9085d405aadcb253ec0392e35fde.tar.gz
CMake-7d09ca52f15f9085d405aadcb253ec0392e35fde.tar.bz2
handle spaces in commands and args
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r--Source/ctest.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 7d55229..8395b1e 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -139,7 +139,8 @@ void ctest::ProcessDirectory(int &passed, int &failed)
fprintf(stderr,"Testing %-30s ",args[0].c_str());
//std::cerr << "Testing " << args[0] << " ... ";
// find the test executable
- std::string testCommand = this->FindExecutable(args[1].c_str());
+ std::string testCommand =
+ cmSystemTools::EscapeSpaces(this->FindExecutable(args[1].c_str()).c_str());
// add the arguments
std::vector<std::string>::iterator j = args.begin();
++j;
@@ -147,7 +148,7 @@ void ctest::ProcessDirectory(int &passed, int &failed)
for(;j != args.end(); ++j)
{
testCommand += " ";
- testCommand += *j;
+ testCommand += cmSystemTools::EscapeSpaces(j->c_str());
}
/**
* Run an executable command and put the stdout in output.