mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 02:59:31 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user