MCPcopy Create free account
hub / github.com/boostorg/filesystem / test_copy_dir_default

Function test_copy_dir_default

test/copy_test.cpp:121–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void 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
147void test_copy_dir_default_ec(fs::path const& root_dir, bool with_symlinks)
148{

Callers 1

mainFunction · 0.85

Calls 7

collect_directory_treeFunction · 0.85
verify_fileFunction · 0.70
unique_pathFunction · 0.50
copyFunction · 0.50
remove_allFunction · 0.50
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected