| 290 | } // namespace |
| 291 | |
| 292 | int main() |
| 293 | { |
| 294 | try |
| 295 | { |
| 296 | fs::path root_dir = create_tree(); |
| 297 | |
| 298 | test_copy_file_default(root_dir); |
| 299 | test_copy_dir_default(root_dir, false); |
| 300 | test_copy_dir_default_ec(root_dir, false); |
| 301 | test_copy_dir_recursive(root_dir); |
| 302 | test_copy_dir_recursive_tree(root_dir); |
| 303 | |
| 304 | bool symlinks_supported = false; |
| 305 | try |
| 306 | { |
| 307 | fs::create_symlink("f1", root_dir / "s1"); |
| 308 | symlinks_supported = true; |
| 309 | std::cout << " *** For information only ***\n" |
| 310 | " create_symlink() attempt succeeded" |
| 311 | << std::endl; |
| 312 | } |
| 313 | catch (fs::filesystem_error& e) |
| 314 | { |
| 315 | std::cout << " *** For information only ***\n" |
| 316 | " create_symlink() attempt failed\n" |
| 317 | " filesystem_error.what() reports: " |
| 318 | << e.what() << "\n" |
| 319 | " create_symlink() may not be supported on this operating system or file system" |
| 320 | << std::endl; |
| 321 | } |
| 322 | |
| 323 | if (symlinks_supported) |
| 324 | { |
| 325 | test_copy_dir_default(root_dir, true); |
| 326 | test_copy_file_symlinks(root_dir); |
| 327 | } |
| 328 | |
| 329 | test_copy_errors(root_dir, symlinks_supported); |
| 330 | |
| 331 | fs::remove_all(root_dir); |
| 332 | |
| 333 | return boost::report_errors(); |
| 334 | } |
| 335 | catch (std::exception& e) |
| 336 | { |
| 337 | std::cout << "FAIL, exception caught: " << boost::diagnostic_information(e) << std::endl; |
| 338 | return 1; |
| 339 | } |
| 340 | } |
nothing calls this directly
no test coverage detected