summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-28 12:21:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-28 12:21:55 (GMT)
commitbf365792a11ce84426c8fc61738891c8e14fee43 (patch)
treec7d5fe9ab5a3d3924aa5f9d05ce8c1e71663d422 /Source/kwsys/testSystemTools.cxx
parent2d4bef07d9450984bd865eae44192a2137ad899e (diff)
parentee71b75133d3e515172b5fbe3dccf7d3906f5a19 (diff)
downloadCMake-bf365792a11ce84426c8fc61738891c8e14fee43.zip
CMake-bf365792a11ce84426c8fc61738891c8e14fee43.tar.gz
CMake-bf365792a11ce84426c8fc61738891c8e14fee43.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/testSystemTools.cxx')
-rw-r--r--Source/kwsys/testSystemTools.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 42b6249..15d8eab 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -156,6 +156,24 @@ static bool CheckFileOperations()
res = false;
}
+ kwsys_stl::string const testFileMissing(testNewDir + "/testMissingFile.txt");
+ if (!kwsys::SystemTools::RemoveFile(testFileMissing))
+ {
+ std::string const& msg = kwsys::SystemTools::GetLastSystemError();
+ kwsys_ios::cerr <<
+ "RemoveFile(\"" << testFileMissing << "\") failed: " << msg << "\n";
+ res = false;
+ }
+
+ kwsys_stl::string const testFileMissingDir(testNewDir + "/missing/file.txt");
+ if (!kwsys::SystemTools::RemoveFile(testFileMissingDir))
+ {
+ std::string const& msg = kwsys::SystemTools::GetLastSystemError();
+ kwsys_ios::cerr <<
+ "RemoveFile(\"" << testFileMissingDir << "\") failed: " << msg << "\n";
+ res = false;
+ }
+
kwsys::SystemTools::Touch(testNewFile.c_str(), true);
if (!kwsys::SystemTools::RemoveADirectory(testNewDir))
{