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

Function test_copy_file_default

test/copy_test.cpp:99–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void test_copy_file_default(fs::path const& root_dir)
100{
101 std::cout << "test_copy_file_default" << std::endl;
102
103 fs::path target_dir = fs::unique_path();
104 fs::create_directory(target_dir);
105
106 fs::copy(root_dir / "f1", target_dir);
107 fs::copy(root_dir / "f2", target_dir / "f3");
108
109 directory_tree tree = collect_directory_tree(target_dir);
110
111 BOOST_TEST_EQ(tree.size(), 2u);
112 BOOST_TEST(tree.find("f1") != tree.end());
113 BOOST_TEST(tree.find("f3") != tree.end());
114
115 verify_file(target_dir / "f1", "f1");
116 verify_file(target_dir / "f3", "f2");
117
118 fs::remove_all(target_dir);
119}
120
121void test_copy_dir_default(fs::path const& root_dir, bool with_symlinks)
122{

Callers 1

mainFunction · 0.85

Calls 8

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

Tested by

no test coverage detected