MCPcopy Create free account
hub / github.com/Kitware/CMake / CheckIsSubDirectory

Function CheckIsSubDirectory

Source/kwsys/testSystemTools.cxx:934–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934static bool CheckIsSubDirectory()
935{
936 bool res = true;
937
938 if (kwsys::SystemTools::IsSubDirectory("/foo", "/") == false) {
939 std::cerr << "Problem with IsSubDirectory (root - unix): " << std::endl;
940 res = false;
941 }
942 if (kwsys::SystemTools::IsSubDirectory("c:/foo", "c:/") == false) {
943 std::cerr << "Problem with IsSubDirectory (root - dos): " << std::endl;
944 res = false;
945 }
946 if (kwsys::SystemTools::IsSubDirectory("/foo/bar", "/foo") == false) {
947 std::cerr << "Problem with IsSubDirectory (deep): " << std::endl;
948 res = false;
949 }
950 if (kwsys::SystemTools::IsSubDirectory("/foo", "/foo") == true) {
951 std::cerr << "Problem with IsSubDirectory (identity): " << std::endl;
952 res = false;
953 }
954 if (kwsys::SystemTools::IsSubDirectory("/fooo", "/foo") == true) {
955 std::cerr << "Problem with IsSubDirectory (substring): " << std::endl;
956 res = false;
957 }
958 if (kwsys::SystemTools::IsSubDirectory("/foo/", "/foo") == true) {
959 std::cerr << "Problem with IsSubDirectory (prepended slash): "
960 << std::endl;
961 res = false;
962 }
963
964 return res;
965}
966
967static bool CheckGetLineFromStream()
968{

Callers 1

testSystemToolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…