ENH: increase coverage
This commit is contained in:
parent
14b07c0973
commit
2d9e5edb27
|
@ -1789,23 +1789,6 @@ std::string cmSystemTools::GetFilenameExtension(const std::string& filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return file extension of a full filename (dot included).
|
|
||||||
*/
|
|
||||||
std::string cmSystemTools::GetFilenameShortestExtension(const std::string& filename)
|
|
||||||
{
|
|
||||||
std::string name = cmSystemTools::GetFilenameName(filename);
|
|
||||||
std::string::size_type dot_pos = name.rfind(".");
|
|
||||||
if(dot_pos != std::string::npos)
|
|
||||||
{
|
|
||||||
return name.substr(dot_pos);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return file name without extension of a full filename (i.e. without path).
|
* Return file name without extension of a full filename (i.e. without path).
|
||||||
|
|
|
@ -248,7 +248,6 @@ public:
|
||||||
|
|
||||||
///! return file extension of a full filename (dot included).
|
///! return file extension of a full filename (dot included).
|
||||||
static std::string GetFilenameExtension(const std::string&);
|
static std::string GetFilenameExtension(const std::string&);
|
||||||
static std::string GetFilenameShortestExtension(const std::string&);
|
|
||||||
|
|
||||||
///! return file name without extension of a full filename.
|
///! return file name without extension of a full filename.
|
||||||
static std::string GetFilenameNameWithoutExtension(const std::string&);
|
static std::string GetFilenameNameWithoutExtension(const std::string&);
|
||||||
|
|
|
@ -103,7 +103,12 @@ ENDFOREACH (ext)
|
||||||
FIND_LIBRARY(FIND_DUMMY_LIB
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
dummylib
|
dummylib
|
||||||
PATHS
|
PATHS
|
||||||
${Complex_BINARY_DIR}/Library)
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
|
NAMES dummylib dummylib2
|
||||||
|
PATHS
|
||||||
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test SET_SOURCE_FILES_PROPERTIES
|
# Test SET_SOURCE_FILES_PROPERTIES
|
||||||
|
@ -135,7 +140,7 @@ IF (WIN32)
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
||||||
FIND_PATH(REGISTRY_TEST_PATH
|
FIND_PATH(REGISTRY_TEST_PATH
|
||||||
${file}
|
${file}
|
||||||
"[${hkey}]")
|
"[${hkey}]" DOC "Registry_Test_Path")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
||||||
ENDIF (NOT UNIX)
|
ENDIF (NOT UNIX)
|
||||||
|
|
|
@ -691,6 +691,20 @@ int main()
|
||||||
cmFailed("ESCAPE_QUOTES is not working");
|
cmFailed("ESCAPE_QUOTES is not working");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
// Test cmSystemTools::UpperCase
|
||||||
|
std::string str = "abc";
|
||||||
|
std::string strupper = "ABC";
|
||||||
|
if(cmSystemTools::UpperCase(str) == strupper)
|
||||||
|
{
|
||||||
|
cmPassed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmFailed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Summary
|
// Summary
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,12 @@ ENDFOREACH (ext)
|
||||||
FIND_LIBRARY(FIND_DUMMY_LIB
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
dummylib
|
dummylib
|
||||||
PATHS
|
PATHS
|
||||||
${Complex_BINARY_DIR}/Library)
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
|
NAMES dummylib dummylib2
|
||||||
|
PATHS
|
||||||
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test SET_SOURCE_FILES_PROPERTIES
|
# Test SET_SOURCE_FILES_PROPERTIES
|
||||||
|
@ -135,7 +140,7 @@ IF (WIN32)
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
||||||
FIND_PATH(REGISTRY_TEST_PATH
|
FIND_PATH(REGISTRY_TEST_PATH
|
||||||
${file}
|
${file}
|
||||||
"[${hkey}]")
|
"[${hkey}]" DOC "Registry_Test_Path")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
||||||
ENDIF (NOT UNIX)
|
ENDIF (NOT UNIX)
|
||||||
|
|
|
@ -691,6 +691,20 @@ int main()
|
||||||
cmFailed("ESCAPE_QUOTES is not working");
|
cmFailed("ESCAPE_QUOTES is not working");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
// Test cmSystemTools::UpperCase
|
||||||
|
std::string str = "abc";
|
||||||
|
std::string strupper = "ABC";
|
||||||
|
if(cmSystemTools::UpperCase(str) == strupper)
|
||||||
|
{
|
||||||
|
cmPassed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmFailed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Summary
|
// Summary
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,12 @@ ENDFOREACH (ext)
|
||||||
FIND_LIBRARY(FIND_DUMMY_LIB
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
dummylib
|
dummylib
|
||||||
PATHS
|
PATHS
|
||||||
${Complex_BINARY_DIR}/Library)
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
|
FIND_LIBRARY(FIND_DUMMY_LIB
|
||||||
|
NAMES dummylib dummylib2
|
||||||
|
PATHS
|
||||||
|
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test SET_SOURCE_FILES_PROPERTIES
|
# Test SET_SOURCE_FILES_PROPERTIES
|
||||||
|
@ -135,7 +140,7 @@ IF (WIN32)
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "write_regv \"${hkey}\" \"${dir}\"")
|
||||||
FIND_PATH(REGISTRY_TEST_PATH
|
FIND_PATH(REGISTRY_TEST_PATH
|
||||||
${file}
|
${file}
|
||||||
"[${hkey}]")
|
"[${hkey}]" DOC "Registry_Test_Path")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "delete_regv \"${hkey}\"")
|
||||||
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
EXEC_PROGRAM(${CCOMMAND_COMMAND} ARGS "remove \"${dir}/${file}\"")
|
||||||
ENDIF (NOT UNIX)
|
ENDIF (NOT UNIX)
|
||||||
|
|
|
@ -691,6 +691,20 @@ int main()
|
||||||
cmFailed("ESCAPE_QUOTES is not working");
|
cmFailed("ESCAPE_QUOTES is not working");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
// Test cmSystemTools::UpperCase
|
||||||
|
std::string str = "abc";
|
||||||
|
std::string strupper = "ABC";
|
||||||
|
if(cmSystemTools::UpperCase(str) == strupper)
|
||||||
|
{
|
||||||
|
cmPassed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmFailed("cmSystemTools::UpperCase is working");
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Summary
|
// Summary
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue