mirror of
https://github.com/boostorg/filesystem.git
synced 2025-05-12 13:41:47 +00:00
Nonessential code formatting cleanup.
This commit is contained in:
parent
1dc3225920
commit
4642ac8e03
@ -1806,13 +1806,14 @@ namespace
|
|||||||
// Directory junctions are very similar to symlinks, but have some performance
|
// Directory junctions are very similar to symlinks, but have some performance
|
||||||
// and other advantages over symlinks. They can be created from the command line
|
// and other advantages over symlinks. They can be created from the command line
|
||||||
// with "mklink /j junction-name target-path".
|
// with "mklink /j junction-name target-path".
|
||||||
|
|
||||||
// Make sure that mklink does exist, it doesn't for e.g. cygwin
|
// Make sure that mklink does exist, it doesn't for e.g. cygwin
|
||||||
if(std::system("mklink /?") != 0)
|
if(std::system("mklink /?") != 0)
|
||||||
{
|
{
|
||||||
cout << " junction point could not be created." << endl;
|
cout << " junction point could not be created." << endl;
|
||||||
cout << " Skipping junction tests." << endl;
|
cout << " Skipping junction tests." << endl;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cout << " directory junction tests..." << endl;
|
cout << " directory junction tests..." << endl;
|
||||||
BOOST_TEST(fs::exists(dir));
|
BOOST_TEST(fs::exists(dir));
|
||||||
@ -1836,14 +1837,14 @@ namespace
|
|||||||
//std::system("dir");
|
//std::system("dir");
|
||||||
fs::current_path(cur_path);
|
fs::current_path(cur_path);
|
||||||
//cout << " current_path() is " << fs::current_path() << endl;
|
//cout << " current_path() is " << fs::current_path() << endl;
|
||||||
|
|
||||||
BOOST_TEST(fs::exists(junc));
|
BOOST_TEST(fs::exists(junc));
|
||||||
BOOST_TEST(fs::is_symlink(junc));
|
BOOST_TEST(fs::is_symlink(junc));
|
||||||
BOOST_TEST(fs::is_directory(junc));
|
BOOST_TEST(fs::is_directory(junc));
|
||||||
BOOST_TEST(!fs::is_regular_file(junc));
|
BOOST_TEST(!fs::is_regular_file(junc));
|
||||||
BOOST_TEST(fs::exists(junc / "d1f1"));
|
BOOST_TEST(fs::exists(junc / "d1f1"));
|
||||||
BOOST_TEST(fs::is_regular_file(junc / "d1f1"));
|
BOOST_TEST(fs::is_regular_file(junc / "d1f1"));
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (fs::directory_iterator itr(junc); itr != fs::directory_iterator(); ++itr)
|
for (fs::directory_iterator itr(junc); itr != fs::directory_iterator(); ++itr)
|
||||||
{
|
{
|
||||||
@ -1852,7 +1853,7 @@ namespace
|
|||||||
}
|
}
|
||||||
cout << " iteration count is " << count << endl;
|
cout << " iteration count is " << count << endl;
|
||||||
BOOST_TEST(count > 0);
|
BOOST_TEST(count > 0);
|
||||||
|
|
||||||
fs::rename(junc, new_junc);
|
fs::rename(junc, new_junc);
|
||||||
BOOST_TEST(!fs::exists(junc));
|
BOOST_TEST(!fs::exists(junc));
|
||||||
BOOST_TEST(fs::exists(new_junc));
|
BOOST_TEST(fs::exists(new_junc));
|
||||||
@ -1861,7 +1862,7 @@ namespace
|
|||||||
BOOST_TEST(!fs::is_regular_file(new_junc));
|
BOOST_TEST(!fs::is_regular_file(new_junc));
|
||||||
BOOST_TEST(fs::exists(new_junc / "d1f1"));
|
BOOST_TEST(fs::exists(new_junc / "d1f1"));
|
||||||
BOOST_TEST(fs::is_regular_file(new_junc / "d1f1"));
|
BOOST_TEST(fs::is_regular_file(new_junc / "d1f1"));
|
||||||
|
|
||||||
fs::remove(new_junc);
|
fs::remove(new_junc);
|
||||||
BOOST_TEST(!fs::exists(new_junc / "d1f1"));
|
BOOST_TEST(!fs::exists(new_junc / "d1f1"));
|
||||||
BOOST_TEST(!fs::exists(new_junc));
|
BOOST_TEST(!fs::exists(new_junc));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user