summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-07-31 17:50:50 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-07-31 17:50:50 (GMT)
commit4f9fcad327f4f694487b183464291e93a90bfb36 (patch)
tree1047b635b4d56725a91f7730f41048c1eada2156 /Source/kwsys/testSystemTools.cxx
parentb24533f27cfc6ced9cc8c80a75453f155646186b (diff)
downloadCMake-4f9fcad327f4f694487b183464291e93a90bfb36.zip
CMake-4f9fcad327f4f694487b183464291e93a90bfb36.tar.gz
CMake-4f9fcad327f4f694487b183464291e93a90bfb36.tar.bz2
ENH: better coverage
Diffstat (limited to 'Source/kwsys/testSystemTools.cxx')
-rw-r--r--Source/kwsys/testSystemTools.cxx42
1 files changed, 40 insertions, 2 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index d83bd90..7faa4bf 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -93,7 +93,7 @@ bool CheckEscapeChars(kwsys_stl::string input,
}
//----------------------------------------------------------------------------
-bool CheckDetectFileType()
+bool CheckFileOperations()
{
bool res = true;
@@ -114,6 +114,14 @@ bool CheckDetectFileType()
<< TEST_SYSTEMTOOLS_SRC_FILE << kwsys_ios::endl;
res = false;
}
+
+ if (kwsys::SystemTools::FileLength(TEST_SYSTEMTOOLS_BIN_FILE) != 766)
+ {
+ kwsys_ios::cerr
+ << "Problem with FileLength - incorrect length for: "
+ << TEST_SYSTEMTOOLS_BIN_FILE << kwsys_ios::endl;
+ res = false;
+ }
return res;
}
@@ -264,7 +272,37 @@ bool CheckStringOperations()
<< TEST_SYSTEMTOOLS_SRC_FILE << kwsys_ios::endl;
res = false;
}
+
+ if (kwsys::SystemTools::ConvertToWindowsOutputPath
+ ("L://Local Mojo/Hex Power Pack/Iffy Voodoo") !=
+ "\"L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"")
+ {
+ kwsys_ios::cerr
+ << "Problem with ConvertToWindowsOutputPath "
+ << kwsys_ios::endl;
+ res = false;
+ }
+ if (kwsys::SystemTools::ConvertToWindowsOutputPath
+ ("//grayson/Local Mojo/Hex Power Pack/Iffy Voodoo") !=
+ "\"\\\\grayson\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"")
+ {
+ kwsys_ios::cerr
+ << "Problem with ConvertToWindowsOutputPath "
+ << kwsys_ios::endl;
+ res = false;
+ }
+
+ if (kwsys::SystemTools::ConvertToUnixOutputPath
+ ("//Local Mojo/Hex Power Pack/Iffy Voodoo") !=
+ "/Local\\ Mojo/Hex\\ Power\\ Pack/Iffy\\ Voodoo")
+ {
+ kwsys_ios::cerr
+ << "Problem with ConvertToUnixOutputPath "
+ << kwsys_ios::endl;
+ res = false;
+ }
+
int targc;
char **targv;
kwsys::SystemTools::ConvertWindowsCommandLineToUnixArguments
@@ -312,7 +350,7 @@ int main(/*int argc, char* argv*/)
*checkEscapeChars[cc][2], checkEscapeChars[cc][3]);
}
- res &= CheckDetectFileType();
+ res &= CheckFileOperations();
res &= CheckStringOperations();