| 932 | } |
| 933 | |
| 934 | static 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 | |
| 967 | static bool CheckGetLineFromStream() |
| 968 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…