diff --git a/test/operations_test.cpp b/test/operations_test.cpp index 16a1d2a..adf7e5f 100644 --- a/test/operations_test.cpp +++ b/test/operations_test.cpp @@ -1806,13 +1806,14 @@ namespace // Directory junctions are very similar to symlinks, but have some performance // and other advantages over symlinks. They can be created from the command line // with "mklink /j junction-name target-path". - + // Make sure that mklink does exist, it doesn't for e.g. cygwin if(std::system("mklink /?") != 0) { cout << " junction point could not be created." << endl; cout << " Skipping junction tests." << endl; - } else + } + else { cout << " directory junction tests..." << endl; BOOST_TEST(fs::exists(dir)); @@ -1836,14 +1837,14 @@ namespace //std::system("dir"); fs::current_path(cur_path); //cout << " current_path() is " << fs::current_path() << endl; - + BOOST_TEST(fs::exists(junc)); BOOST_TEST(fs::is_symlink(junc)); BOOST_TEST(fs::is_directory(junc)); BOOST_TEST(!fs::is_regular_file(junc)); BOOST_TEST(fs::exists(junc / "d1f1")); BOOST_TEST(fs::is_regular_file(junc / "d1f1")); - + int count = 0; for (fs::directory_iterator itr(junc); itr != fs::directory_iterator(); ++itr) { @@ -1852,7 +1853,7 @@ namespace } cout << " iteration count is " << count << endl; BOOST_TEST(count > 0); - + fs::rename(junc, new_junc); BOOST_TEST(!fs::exists(junc)); BOOST_TEST(fs::exists(new_junc)); @@ -1861,7 +1862,7 @@ namespace BOOST_TEST(!fs::is_regular_file(new_junc)); BOOST_TEST(fs::exists(new_junc / "d1f1")); BOOST_TEST(fs::is_regular_file(new_junc / "d1f1")); - + fs::remove(new_junc); BOOST_TEST(!fs::exists(new_junc / "d1f1")); BOOST_TEST(!fs::exists(new_junc));