test: Remove unused fs::create_directories test

The test was added in commit ddb75c2e87.
After the create_directories wrapper removal, the test is redundant with
the unit test in the upstream stdlib. Also, there is a Bitcoin Core
functional test that covers this behavior in
test/functional/feature_dirsymlinks.py

So remove this unit test.

Finally, I could not find a real system that still ships a buggy stdlib
(v11.2) in their package manager. A stand-alone test is also available
in compiler-explorer under https://godbolt.org/z/aeMKraYrT.
This commit is contained in:
MarcoFalke
2025-11-11 16:59:45 +01:00
parent fa9dacdbde
commit fa3854e432

View File

@@ -139,28 +139,4 @@ BOOST_AUTO_TEST_CASE(rename)
fs::remove(path2);
}
#ifndef __MINGW64__ // no symlinks on mingw
BOOST_AUTO_TEST_CASE(create_directories)
{
// Test fs::create_directories workaround.
const fs::path tmpfolder{m_args.GetDataDirBase()};
const fs::path dir{tmpfolder / "a"};
fs::create_directory(dir);
BOOST_CHECK(fs::exists(dir));
BOOST_CHECK(fs::is_directory(dir));
BOOST_CHECK(!fs::create_directories(dir));
const fs::path symlink{tmpfolder / "b"};
fs::create_directory_symlink(dir, symlink);
BOOST_CHECK(fs::exists(symlink));
BOOST_CHECK(fs::is_symlink(symlink));
BOOST_CHECK(fs::is_directory(symlink));
BOOST_CHECK(!fs::create_directories(symlink));
fs::remove(symlink);
fs::remove(dir);
}
#endif // __MINGW64__
BOOST_AUTO_TEST_SUITE_END()