| 266 | // directory_entry_test ------------------------------------------------------------// |
| 267 | |
| 268 | void directory_entry_test(path const& temp_dir) |
| 269 | { |
| 270 | cout << "directory_entry test..." << endl; |
| 271 | |
| 272 | create_file(temp_dir / "foo.bar"); |
| 273 | create_file(temp_dir / "goo.bar"); |
| 274 | create_directory(temp_dir / "bar.foo"); |
| 275 | |
| 276 | directory_entry de(temp_dir / "foo.bar"); |
| 277 | |
| 278 | CHECK(de.path() == temp_dir / "foo.bar"); |
| 279 | CHECK(de.status().type() == regular_file); |
| 280 | CHECK(de.symlink_status().type() == regular_file); |
| 281 | CHECK(de.is_regular_file()); |
| 282 | CHECK(de < directory_entry(temp_dir / "goo.bar")); |
| 283 | CHECK(de == directory_entry(temp_dir / "foo.bar")); |
| 284 | CHECK(de != directory_entry(temp_dir / "goo.bar")); |
| 285 | de.replace_filename("bar.foo"); |
| 286 | CHECK(de.path() == temp_dir / "bar.foo"); |
| 287 | CHECK(de.is_directory()); |
| 288 | CHECK(de.status().type() == directory_file); |
| 289 | CHECK(de.symlink_status().type() == directory_file); |
| 290 | |
| 291 | boost::filesystem::remove(temp_dir / "bar.foo"); |
| 292 | boost::filesystem::remove(temp_dir / "goo.bar"); |
| 293 | boost::filesystem::remove(temp_dir / "foo.bar"); |
| 294 | } |
| 295 | |
| 296 | // directory_entry_overload_test ---------------------------------------------------// |
| 297 |
no test coverage detected