| 119 | } |
| 120 | |
| 121 | void test_copy_dir_default(fs::path const& root_dir, bool with_symlinks) |
| 122 | { |
| 123 | std::cout << "test_copy_dir_default" << std::endl; |
| 124 | |
| 125 | fs::path target_dir = fs::unique_path(); |
| 126 | |
| 127 | fs::copy(root_dir, target_dir); |
| 128 | |
| 129 | directory_tree tree = collect_directory_tree(target_dir); |
| 130 | |
| 131 | BOOST_TEST_EQ(tree.size(), 4u + with_symlinks); |
| 132 | BOOST_TEST(tree.find("f1") != tree.end()); |
| 133 | BOOST_TEST(tree.find("f2") != tree.end()); |
| 134 | BOOST_TEST(tree.find("d1") != tree.end()); |
| 135 | BOOST_TEST(tree.find("d2") != tree.end()); |
| 136 | if (with_symlinks) |
| 137 | { |
| 138 | BOOST_TEST(tree.find("s1") != tree.end()); |
| 139 | } |
| 140 | |
| 141 | verify_file(target_dir / "f1", "f1"); |
| 142 | verify_file(target_dir / "f2", "f2"); |
| 143 | |
| 144 | fs::remove_all(target_dir); |
| 145 | } |
| 146 | |
| 147 | void test_copy_dir_default_ec(fs::path const& root_dir, bool with_symlinks) |
| 148 | { |
no test coverage detected