| 141 | } |
| 142 | |
| 143 | static bool testMakeTempDirectory() |
| 144 | { |
| 145 | std::cout << "testMakeTempDirectory()\n"; |
| 146 | |
| 147 | static std::string const kTemplate = "testMakeTempDirectory-XXXXXX"; |
| 148 | std::string tempDir = kTemplate; |
| 149 | cmsys::Status status = cmSystemTools::MakeTempDirectory(tempDir); |
| 150 | if (!status) { |
| 151 | std::cout << "cmSystemTools::MakeTempDirectory failed on \"" << tempDir |
| 152 | << "\": " << status.GetString() << '\n'; |
| 153 | return false; |
| 154 | } |
| 155 | if (!cmSystemTools::FileIsDirectory(tempDir)) { |
| 156 | std::cout << "cmSystemTools::MakeTempDirectory did not create \"" |
| 157 | << tempDir << '\n'; |
| 158 | return false; |
| 159 | } |
| 160 | cmSystemTools::RemoveADirectory(tempDir); |
| 161 | ASSERT_TRUE(tempDir != kTemplate); |
| 162 | return true; |
| 163 | } |
| 164 | |
| 165 | int testSystemTools(int /*unused*/, char* /*unused*/[]) |
| 166 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…