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

Function cpp_main

test/long_path_test.cpp:26–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24} // unnamed namespace
25
26int cpp_main(int, char*[])
27{
28
29 std::string prefix("d:\\temp\\");
30 std::cout << "prefix is " << prefix << '\n';
31
32 const std::size_t safe_size = 260 - prefix.size() - 100; // Windows MAX_PATH is 260
33
34 std::string safe_x_string(safe_size, 'x');
35 std::string safe_y_string(safe_size, 'y');
36 std::string path_escape("\\\\?\\");
37
38 path x_p(prefix + safe_x_string);
39 path y_p(path_escape + prefix + safe_x_string + "\\" + safe_y_string);
40
41 std::cout << "x_p.native().size() is " << x_p.native().size() << '\n';
42 std::cout << "y_p.native().size() is " << y_p.native().size() << '\n';
43
44 create_directory(x_p);
45 BOOST_TEST(exists(x_p));
46 create_directory(y_p);
47 BOOST_TEST(exists(y_p));
48
49 //std::cout << "directory x.../y... ready for testing, where ... is " << safe_size
50 // << " repeats of x and y, respectively\n";
51
52 BOOST_TEST(exists(x_p));
53
54 //remove_all(x_p);
55
56 return ::boost::report_errors();
57}

Callers

nothing calls this directly

Calls 3

create_directoryFunction · 0.50
existsFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected