| 901 | } |
| 902 | |
| 903 | static bool CheckFind() |
| 904 | { |
| 905 | bool res = true; |
| 906 | std::string const testFindFileName("testFindFile.txt"); |
| 907 | std::string const testFindFile(TEST_SYSTEMTOOLS_BINARY_DIR "/" + |
| 908 | testFindFileName); |
| 909 | |
| 910 | if (!kwsys::SystemTools::Touch(testFindFile, true)) { |
| 911 | std::cerr << "Problem with Touch for: " << testFindFile << std::endl; |
| 912 | // abort here as the existence of the file only makes the test meaningful |
| 913 | return false; |
| 914 | } |
| 915 | |
| 916 | std::vector<std::string> searchPaths; |
| 917 | searchPaths.emplace_back(TEST_SYSTEMTOOLS_BINARY_DIR); |
| 918 | if (kwsys::SystemTools::FindFile(testFindFileName, searchPaths, true) |
| 919 | .empty()) { |
| 920 | std::cerr << "Problem with FindFile without system paths for: " |
| 921 | << testFindFileName << std::endl; |
| 922 | res = false; |
| 923 | } |
| 924 | if (kwsys::SystemTools::FindFile(testFindFileName, searchPaths, false) |
| 925 | .empty()) { |
| 926 | std::cerr << "Problem with FindFile with system paths for: " |
| 927 | << testFindFileName << std::endl; |
| 928 | res = false; |
| 929 | } |
| 930 | |
| 931 | return res; |
| 932 | } |
| 933 | |
| 934 | static bool CheckIsSubDirectory() |
| 935 | { |
no test coverage detected
searching dependent graphs…