| 65 | // ====================================================================== |
| 66 | |
| 67 | void TestAndRemoveFile(char const* filename) |
| 68 | { |
| 69 | struct stat st; |
| 70 | if (stat(filename, &st) < 0) { |
| 71 | cmFailed("Could not find file: ", filename); |
| 72 | } else { |
| 73 | if (remove(filename) < 0) { |
| 74 | cmFailed("Unable to remove file. It does not imply that this test " |
| 75 | "failed, but it *will* be corrupted thereafter if this file is " |
| 76 | "not removed: ", |
| 77 | filename); |
| 78 | } else { |
| 79 | cmPassed("Find and remove file: ", filename); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | // ====================================================================== |
| 85 | |