| 176 | } |
| 177 | |
| 178 | void test_copy_dir_recursive(fs::path const& root_dir) |
| 179 | { |
| 180 | std::cout << "test_copy_dir_recursive" << std::endl; |
| 181 | |
| 182 | fs::path target_dir = fs::unique_path(); |
| 183 | |
| 184 | fs::copy(root_dir, target_dir, fs::copy_options::recursive); |
| 185 | |
| 186 | directory_tree tree = collect_directory_tree(target_dir); |
| 187 | |
| 188 | BOOST_TEST_EQ(tree.size(), 9u); |
| 189 | BOOST_TEST(tree.find("f1") != tree.end()); |
| 190 | BOOST_TEST(tree.find("f2") != tree.end()); |
| 191 | BOOST_TEST(tree.find("d1") != tree.end()); |
| 192 | BOOST_TEST(tree.find(fs::path("d1") / "f1") != tree.end()); |
| 193 | BOOST_TEST(tree.find(fs::path("d1") / "d1") != tree.end()); |
| 194 | BOOST_TEST(tree.find(fs::path("d1") / "d1" / "f1") != tree.end()); |
| 195 | BOOST_TEST(tree.find(fs::path("d1") / "d2") != tree.end()); |
| 196 | BOOST_TEST(tree.find("d2") != tree.end()); |
| 197 | BOOST_TEST(tree.find(fs::path("d2") / "f1") != tree.end()); |
| 198 | |
| 199 | verify_file(target_dir / "f1", "f1"); |
| 200 | verify_file(target_dir / "f2", "f2"); |
| 201 | verify_file(target_dir / "d1/f1", "d1f1"); |
| 202 | verify_file(target_dir / "d1/d1/f1", "d1d1f1"); |
| 203 | verify_file(target_dir / "d2/f1", "d2f1"); |
| 204 | |
| 205 | fs::remove_all(target_dir); |
| 206 | } |
| 207 | |
| 208 | void test_copy_dir_recursive_tree(fs::path const& root_dir) |
| 209 | { |
no test coverage detected