summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-22 17:57:08 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-22 17:57:08 (GMT)
commit2e6063068c94d4045e699fed51e6d1e9af344bbf (patch)
treed11025f71134b3238e52655640dcdf2158425597 /Source/kwsys/testSystemTools.cxx
parent81739e9215ef10d870f14404b0ec5eb4bee16ce4 (diff)
parent3bb707f0a1408dc0381ecbf4ec934e9f14d8927c (diff)
downloadCMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.zip
CMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.tar.gz
CMake-2e6063068c94d4045e699fed51e6d1e9af344bbf.tar.bz2
Merge branch 'improve-variable-help-formatting' into revert-cmake-W-options
Resolve conflicts in Help/variable/CMAKE_ERROR_DEPRECATED.rst Help/variable/CMAKE_WARN_DEPRECATED.rst by integrating changes from both sides.
Diffstat (limited to 'Source/kwsys/testSystemTools.cxx')
-rw-r--r--Source/kwsys/testSystemTools.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 15d8eab..7b5c025 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -98,6 +98,10 @@ static bool CheckEscapeChars(kwsys_stl::string input,
static bool CheckFileOperations()
{
bool res = true;
+ const kwsys_stl::string testNonExistingFile(TEST_SYSTEMTOOLS_SOURCE_DIR
+ "/testSystemToolsNonExistingFile");
+ const kwsys_stl::string testDotFile(TEST_SYSTEMTOOLS_SOURCE_DIR
+ "/.");
const kwsys_stl::string testBinFile(TEST_SYSTEMTOOLS_SOURCE_DIR
"/testSystemTools.bin");
const kwsys_stl::string testTxtFile(TEST_SYSTEMTOOLS_SOURCE_DIR
@@ -106,6 +110,24 @@ static bool CheckFileOperations()
"/testSystemToolsNewDir");
const kwsys_stl::string testNewFile(testNewDir + "/testNewFile.txt");
+ if (kwsys::SystemTools::DetectFileType(testNonExistingFile.c_str()) !=
+ kwsys::SystemTools::FileTypeUnknown)
+ {
+ kwsys_ios::cerr
+ << "Problem with DetectFileType - failed to detect type of: "
+ << testNonExistingFile << kwsys_ios::endl;
+ res = false;
+ }
+
+ if (kwsys::SystemTools::DetectFileType(testDotFile.c_str()) !=
+ kwsys::SystemTools::FileTypeUnknown)
+ {
+ kwsys_ios::cerr
+ << "Problem with DetectFileType - failed to detect type of: "
+ << testDotFile << kwsys_ios::endl;
+ res = false;
+ }
+
if (kwsys::SystemTools::DetectFileType(testBinFile.c_str()) !=
kwsys::SystemTools::FileTypeBinary)
{